Rodrigo Alvarez Fernández
2006-Jan-04 16:26 UTC
[Rails] simple_format and in_place_editor_field
Hi! How can i do to force an in_place_editor_field to format the text with simple_format while not editing? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060104/bbd141a2/attachment.html
If anyone is still looking for the answer to this question, here''s my solution: use the in_place_editor helper instead. <code> <div id="the_text"><%= simple_format @the_text_string %></div> <%= in_place_editor "the_text", { :rows => 2, :cols => 80 } %> </code> -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
ImNotQuiteJack wrote:> If anyone is still looking for the answer to this question, here''s my > solution: use the in_place_editor helper instead. > > <code> > <div id="the_text"><%= simple_format @the_text_string %></div> > <%= in_place_editor "the_text", { :rows => 2, :cols => 80 } %> > </code>If you use this, the formatting will be saved as well. This is not feasible at all if the text has multiple lines, since saving it like this will create blank lines. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---