Forum: Ruby on Rails in_place_editor is missing load_text_url option

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.
A88a8da103044de18418f303bf0c1507?d=identicon&s=25 Bill Burcham (bburcham)
on 2006-02-05 17:05
Ajax.InPlaceEditor supports a loadTextURL option.  If you look at the
InPlaceEditor page
you'll see an excellent example in Rails of how you might use that
option textilize in place edited stuff.

Unfortunately, the example doesn't use the nifty Rails in_place_editor
method because
ActionView::Helpers::JavaScriptMacrosHelper#in_place_editor doesn't
suppport a load_text_url option (that would ostensibly be passed on to
the AJAX constructor as loadTextURL).  Dissapointed.

I added this line to in_place_editor:

js_options['loadTextURL'] = "'#{url_for(options[:load_text_url])}'" if

And now I'm able to create in place editors that get their original text
from the server (not from the DOM).  So from the scriptaculous example,
this code:

<p id="editme2"><%= textilize( @fancy_text )</p>
<script language="JavaScript">
 new Ajax.InPlaceEditor('editme2', 'update_text',

becomes this:

<p id="editme2"><%= textilize( @fancy_text )</p>
<%= in_place_editor( editme2',
  :url => "update_text",
  :load_text_url => "return_unformatted_text",
  :rows => 20 )%>

aside: notice that I elided the :cols option in my example because
in_place_editor is missing the cols option as well...

Anyhoo, so my questions are:

1. is this a worthy change?
2. what is the process for getting the change reflected in "edge"?
3. do you think we should add the rest of the missing options (e.g.
cols) while we're about it?

Or is the prevailing philosophy that if you need to do "sophisticated"
stuff then don't call in_place_editor -- just code the JavaScript
directly?  Or actually, maybe all this is moot with RJS templates and
A88a8da103044de18418f303bf0c1507?d=identicon&s=25 Bill Burcham (bburcham)
on 2006-02-06 17:45
mkay... thunderous silence :)  I took bull by horns and submitted a
A88a8da103044de18418f303bf0c1507?d=identicon&s=25 Bill Burcham (bburcham)
on 2006-02-06 17:47
woops -- that last comment referred to the wrong patch ticket. Here's
the right one:
This topic is locked and can not be replied to.