I have a text_area to accept upto 1000 chars, which is stored as a blob in mysql. When I try to display the saved data, I dont see the new line characters - however I could see the newline characters in EDIT MODE. So my newline char is lost during displaying. Any ideas how to fix it. thanks thila -- Posted via http://www.ruby-forum.com/.
newlines are not rendered in html except within certain tags. they have to be converted to breaks or paragraph tags. try <%= simple_format(your_text) -%> Chris On 8/14/06, Thila Thila <isputnik_98@yahoo.com> wrote:> I have a text_area to accept upto 1000 chars, which is stored as a blob > in mysql. When I try to display the saved data, I dont see the new line > characters - however I could see the newline characters in EDIT MODE. So > my newline char is lost during displaying. Any ideas how to fix it. > thanks > thila > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Chris Hall wrote:> newlines are not rendered in html except within certain tags. they > have to be converted to breaks or paragraph tags. > > try > > <%= simple_format(your_text) -%> > > ChrisThanks for the info. It also helped me out. :) BTW, I''m also wondering if there is any function or plugin that recognizes URL link within the text? -- 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 -~----------~----~----~----~------~----~------~--~---
On Sep 29, 2006, at 3:23 PM, Jay L. wrote:> Thanks for the info. It also helped me out. :) > BTW, I''m also wondering if there is any function or plugin that > recognizes URL link within the text?Yep, it is called auto_link. -- fxn --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---