Add HTML formatting to text_fields

Hey guys, another newb here :slight_smile: Anyway, I’m building another social
network, and I would like to be able to have users type in some text in
the
“Comment” area, and when they put a “new line” space to make a new
paragraph, have it show up when its posted to the site.

  1. Is there a way for them to do it without having to add a
    tag.
    Have it happen similarly to how this google group post is line-breaking?

if not

  1. Is there a way to make the text_field respond to HTML formatting?

Thanks in advance for your help!

On Fri, Aug 15, 2014 at 10:05 AM, Colin S. [email protected] wrote:

I would like to be able to have users type in some text in the “Comment”
area, and when they put a “new line” space to make a new paragraph, have it
show up when its posted to the site.

Check out simple_format. It preserves linebreaks, URLs, and some
other simple HTML, but (if I remember correctly) filters out a lot of
dangerous junk (like script tags). There are also some gems available
to add a WYSIWYG editor.

-Dave


Dave A., freelance software developer (details @ www.Codosaur.us);
see also www.PullRequestRoulette.com, Blog.Codosaur.us, www.Dare2XL.com