-1

suppose I have a from with data that looks like this: http://prntscr.com/gfh0nd Data from form are sended to database - String type (mongoose).

Now how Can I put br tag or new p tag exactly where I did new line with enter key?

Xaoo
  • 167
  • 1
  • 3
  • 9
  • Possible duplicate of [How do I replace all line breaks in a string with
    tags?](https://stackoverflow.com/questions/784539/how-do-i-replace-all-line-breaks-in-a-string-with-br-tags)
    – Mikey Aug 31 '17 at 17:06
  • Ok, but... To make it work I need to put it in {{{body}}}.. That means that user can take advantage of that and use f.e and other tags. – Xaoo Aug 31 '17 at 17:19

1 Answers1

0

I find the way. Just use

white-space: pre-line;

to ur p tag in css :)

Xaoo
  • 167
  • 1
  • 3
  • 9