Examples:
Simple
Custom buttons
Buttons manipulation
Custom settings
Custom functions

mark_it_up

Buttons manipulation example

Code used

show layout code

  
  <%
  
      MarkItUp.buttons = MarkItUp.default_buttons
  
      MarkItUp.replace_button(14, { :name => 'Image', :icon => "image", :key => 'P', :replaceWith => '<img src="/path" alt="" />' })
  
      MarkItUp.insert_button(16, { :name => 'Some button', :icon => 'picture', :key => 'X', :replaceWith => 'something' }) # insert new button at specific position
  
      MarkItUp.insert_button(17, { :separator => '---------------' })
  
      MarkItUp.insert_button({ :name => 'Some other button', :icon => 'code', :key => 'Y', :replaceWith => 'something else' }) # insert new button to the end
  
      MarkItUp.delete_button(3)
  
      MarkItUp.delete_button("Bold")
  
    %>
  
  
  
  <% content_for :head do %>
  
    <%= mark_it_up "#miu_test" %>
  
  <% end %>
  
  
  
  <% form_tag do %>
  
    <%= text_area_tag "miu_test" %>
  
  <% end %>
  

For more info see http://github.com/cingel/mark_it_up