Forum: Ruby on Rails in_place_rich_editor method?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
GG9 R. (Guest)
on 2009-02-04 10:19
For someone i need to fix a bug into an CMS with in place form editing.
Normally i used the in place form described in the rails recipes recipe

But in this project someone used antother method called
The method works correctly until i put the save button.
There is no saving.

in my view

   <%= in_place_rich_editor(,
     :url => { :action => :save_editable, :id => },
     :rows => "5", :cols => "5")

In the application_helper.rb

   def in_place_rich_editor(field_id, options = {})
        function =  "new Ajax.InPlaceRichEditor("
        function << "'#{field_id}', "
        function << "'#{url_for(options[:url])}'"

        js_options = {}
        js_options['cancelText'] = %('#{options[:cancel_text]}') if
        js_options['okText'] = %('#{options[:save_text]}') if
        js_options['loadingText'] = %('#{options[:loading_text]}') if
        js_options['rows'] = options[:rows] if options[:rows]
        js_options['cols'] = options[:cols] if options[:cols]
        js_options['size'] = options[:size] if options[:size]
        js_options['size'] = options[:class] if options[:class]
        js_options['externalControl'] =
"'#{options[:external_control]}'" if options[:external_control]
        js_options['loadTextURL'] =
"'#{url_for(options[:load_text_url])}'" if options[:load_text_url]
        js_options['ajaxOptions'] = options[:options] if
        js_options['evalScripts'] = options[:script] if options[:script]
        js_options['callback']   = "function(form) { return
#{options[:with]} }" if options[:with]
        function << (', ' + options_for_javascript(js_options)) unless

        function << ')'


Is there somebody that knows this type of in place editing?
Julian L. (Guest)
on 2009-02-04 11:58
(Received via mailing list)
Define js InpPlaceRichEditor?

Learn rails:

On 04/02/2009, at 7:19 PM, GA Gorter <rails-mailing-list@andreas-
GG9 R. (Guest)
on 2009-02-04 14:46
I only get a normal text area.
And when i click on save nothing happen.
GG9 R. (Guest)
on 2009-02-04 17:32
This App uses ThinMCE 3.0 but the controls.js doesn't support some

tinyMCE.addMCEControl is not a function.

I put this into the controls.js
tinyMCE.execCommand("mceAddControl", true, "TEXT_AREA_ID");

No result att all but the error has gone, now i have the error

tinyMCE.gtContent is not a function

Is there somewhere an older thinMCE version so i can easily solvve this.
This topic is locked and can not be replied to.