How can I allow users to enter multi-line text in the text_area form text_area ?
Currently, the content content is entered in the text area , line breaks are deleted ... They are saved when editing the content ... So, maybe in the view to show that the breaks are deleted?
I found a few things that indicate that I will need to implement the WYSIWYG editor, but I would rather avoid this if possible.
Any suggestions?
UPDATE: So, it looks like the rails store the content with line breaks, and I can add .html_safe to the field in the show view (i.e. <%= @post.post.html_safe %> ). Now it will contain content with basic html (for example, <br> , <b> , etc.), but still does not display line breaks in the content (i.e. when I press the enter button for a new line), which rails are saved, and I can view when I edit the content.
Joe saunders
source share