It seems you'll need to either provide some default text, or tie the  
"begin edit" functionality to an external control (perhaps an "Edit"  
link, for example).

Either approach would provide some sort of visual indicator of  
"editability," without relying on the user to discover the mouseover/ 
highlight behavior.

http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor  
shows how to do this:

You can also arbitrarily force it into edit mode like so:
   var editor = new Ajax.InPlaceEditor('product_1',...);
   editor.enterEditMode('click');


With regard to HTML entities, there are several bugs open on the  
matter. Until it's part of the trunk (and it may be, I haven't  
checked recently), you may have to override some methods or use the  
callbacks.


TAG

On Sep 25, 2006, at 4:21 AM, Will Merrell wrote:

>
> I am trying to use the Scriptaculous InPlaceEditor and in some  
> cases the
> field will be empty. That is, the field currently has no value but the
> user wants to enter a value.
>
> The InPlaceEditor appears to not work in this case. Other identical
> fields (except wit different ids and some value) do work.
>
> I have tried using a nonbreaking space ( ), and this does  
> cause the
> editor to appear, but then presents " " when the user selects the
> field. If I use a real space, the editor does not appear. I have  
> looked
> at all of the documentation I could find and looked at the code, but
> found nothing that seemed to address this issue.
>
> How do you use the InPlaceEditor with empty data?
>
> --Will Merrell
>
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs
-~----------~----~----~----~------~----~------~--~---

Reply via email to