Hi there,
I need to:
- STORE a text of the below format in a (MySQL) database (using a
‘textarea’), and then - RETRIEVE & DISPLAY it in exactly the same format (meaning: keeping
all paragraphs/line breaks).
The intended text format looks like this:
Blah blahblah blah blah blahblah blah blah
blahblah blah blah blahblah blah, blah
blahblah. ← NEW PARAGRAPH
Blah blahblah blah blah. ← LINE BREAK
Blah blahblah blah blah blahblah blah blah
blahblah blah blah blahblah blah, blah
blahblah.
Until now:
- the text is stored in exactly this format in a ‘text’ field in the
database (which I believe is the correct way to do it) - I have used ‘simple_format’
(ActionView::Helpers::TextHelper)
for displaying
The problem is: LINE BREAKS are displayed correctly, but NOT the
PARAGRAPHS (they appear like simple line breaks).
What am I doing wrong ?!
Thanks a bunch for any hints and help !
Tom