Scott Rutherford

Life on and off the Rails

 

FCKeditor Plugin 0.2.2 Released

September 8th, 2006

There is a new version of the FCKeditor Rails plugin available details of how to get it and a demo are here.

This version fixes a problem with having multiple editors open at once on the same page and also adds a helper to allow multiple editors on the same Ajax form. This also now works with static html forms but you can just use the standard form helpers for that.

To create an ajax form using multiple editors use the fckeditor_form_remote_tag helper and pass the :editors option. This takes an hash of model symbol keys with each having an array as its value. The array should contain the list of fields that will have editors attached to them.

<%= fckeditor_form_remote_tag :url => some_great_url,
     :editors => { :multinote => ['text1', 'text2'] } %>

    <%= fckeditor_textarea( "multinote", "text1", :ajax => true ) %> 
    <%= fckeditor_textarea( "multinote", "text2", :ajax => true ) %> 

<%= end_form_tag %>

You can of course use the same helper for a single editor or for static html forms as it is a bit neater than having to declare the :before javascript method yourself.

Leave a Reply

This blog used the Shay theme as a base and is powered by Mephisto