I actually encountered exactly the same situation myself! My solution
was to simply include the text as an option to the in place editor
control. The problem of that is that when you save the text you not
only have to get the updated HTML from the server but also the updated
text.
So... I think your solution is much better! The server loads the text
to edit when going into edit mode and the server would return the
formatted HTML when saving the updated text. I think it''s great! If I
get time then I''ll add support for this. Let''s see who gets it
done
first. :-)
On 8/20/05, Richard Livsey <richard@livsey.org>
wrote:> I''ve been testing the in-place-editor on a few things and it works
well.
> One use-case I''ve just come across though is the need to load in
the
> text from somewhere other than the source of the page.
>
> For example, I have a block of text which is marked up in
> texttile/markdown/whatever. Editing that block should bring up the
> unformatted markup, not the HTML it''s turned into.
>
> I''d suggest some option which you pass across a URI of where to
get the
> contents from, which is then loaded in through AJAX.
>
> Any suggestions would be welcome. I''m going to have a look at
> implementing something like that now, but I can''t promise how far
along
> I''ll get this evening.
> It''s also my birthday this weekend, so I guarantee I
won''t be working
> over it :o)
>
> --
> R.Livsey
> http://livsey.org
>
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>