Rich Text Editor for your Rails Applications

Posted by stoyan Wed, 26 Apr 2006 08:39:00 GMT

via Aidan Finn’s blog :

widgEditor is a small simple lightweight editor. It provided basic rich functions such as bold, italics, links, lists, images and headings. Rails integration:

  • Download widgEditor and uncompress
  • Copy the widgEditor.js file into …/public/javascripts folder
  • Copy the widgEditor.css file into …/public/stylesheets folder
  • Copy all the images from the widgEditor distribution …/public/images folder
  • Include the javascript and css files in your layout file
  • Give any text field you want to be an editor field a class of ”widgEditor”
Example:
<%= stylesheet_link_tag 'widgEditor' %>
<%= javascript_include_tag "widgEditor" %>
<%= text_area 'node', 'content', :cols => "50", 
    :rows=>"3", :class=>"widgEditor" %>

Comments

(leave url/email »)

  
Powered
Ruby Blogs Directory
Performa
Box.net Refer