Easy way to start using wysiwyg editor for Rails Application (nicEdit) — Read more
Use it in form
<% form_for @page do |f| %> <%= f.resizable_text_area :description %> <%= f.rich_text_area :body %> <% end %>
Add a lines in your controller:
protect_from_forgery :except => :index uploads_nicedit_image :upload_action_name
And add :upload_url option to field:
<%= f.rich_text_area :body, :upload_url => url_for (:action => :upload_action_name) %>
Installing Simple nicEdit plugin:
$ ruby script/plugin install git://github.com/sergio-fry/Simple-nicEdit.git
Add assets to your layout:
<%= include_nicedit_assets %>
-
jquery
-
jquery.livequery
Copyright © 2010 Sergei O. Udalov <[email protected]>, released under the MIT license