I am not following your code all that clearly this morning. Are you 
assigning the IDs in JavaScript or in Ruby?

Advice, in no particular order:

Have a read through the example related to getting a Textile/Markdown 
formatted DIV to work correctly with the IPE -- that's where I went to 
look for clarity. And once I had that part working, the rest just 
worked.

Dynamically creating an editor as needed is just an implementation 
detail, it should not be central to your design. See if you can get it 
to all work long-hand, with a separate JS block after each thing you 
want to be able to edit creating an editor you may or may not need. If 
you are doing this with a lot of items on a page, it may make the whole 
thing unstable or suck memory like a pig, but for testing purposes it 
should get you started.

Once you have everything editing the way you want it to, then add the 
layer of "unobtrusive" IPE using a page listener to start a loop that 
adds a per-item listener. Then delete your separate JS blocks and see 
if it all still works.

There are some Prototype functions that clean out extraneous white 
space, you might want to have a look at those in your travels. But you 
might also want to fill the edited div and your database back in using 
a trim()med version of the IPE output to the same effect.

Walter

On Apr 29, 2007, at 10:30 AM, Tom V. wrote:

> My guess is that I have to separate creation of the IPE and its
> 'activation'.
> Am I sort of right..?
>
> Thanks for your help and patience!
> Tom.


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to