Update a part from an in_place_editor for float type

Skip to first unread message

Ibon Castilla

Jan 25, 2019, 6:36:19 AM1/25/19
to Hobo Users
Hi there people,

This is what I'm trying to do:

<editor update='my-part'>
<span part='my-part'><%= rand %></span>

The thing is that that particular editor tag applies to a float field in my case, and for some reason the span is not getting any update. Other field types (for instance boolean or belongs_to fields) do work smoothly, but floats and so others call a "in_place_editor" definition that seems so complex to me :/

I'm working on a legacy application (Hobo 1.0) and I would like to know if any of you have any tip (or code example) about this particular case :)

I've been seen the source code for editor (applied to float type) here: http://cookbook-1.0.hobocentral.net/api_tag_defs/editor and what I've tried so far:

* Use the update attribute: Hobo seems to parse it well, as the HTML "paints" the span tag correctly (shows a "hobo-update='my-part'" as it should be), but then nothing happens.
* Use a jQuery event hook: I tried to hook to the span with the "change" event but something seem to void my JS code. The code is there, in the spool of events for that span, but some (I guess) PrototypeJS code there voids it :(

My B plan for that editor tag is to override it completely with a custom tag definition (perhaps an input with a working update attribute), but before that I would like to hear a more celebrated voices than mine about this issue :D

Best regards, Ibon.
Reply all
Reply to author
0 new messages