1. Download widgEditor (latest version)
2. Edit the widgEditor.js file as shown below if using AJAX
4. Copy the widgEditor.css file into your applications public/stylesheets folder.
5. Copy all the images from the widgEditor folder to your public/images folder.
7. Give any text field you want to be an editor field a class of “widgEditor”.
%= stylesheet_link_tag 'widgEditor' %>
%= text_area 'profile', 'about', :cols => "50", :rows=>"4", :class=>"widgEditor" %>
Using AJAX and WidgEditor
from: oldOnsubmit = theForm.onsubmit;
to: theForm.oldOnsubmit = theForm.onsubmit;
Then just a few lines below in the new onSubmit function, change the oldOnsubmit() function call to
from: return oldOnsubmit();
to: return theForm.oldOnsubmit()