I understand that that mongo is not for formatting, but how can I create a blog post and display it in paragraph form without it being one block of text?
For example
This has nothing to do with MongoDB. You get text from HTML textarea element and it has "new line" (\n
, \r
or \r\n
) characters as paragraph seperator. When you put it in HTML p elements, those new lines are interpreted as basic whitespaces. You should convert those "new line" characters into HTML br elements or put every text block into seperate p elements.
Check this npm package: https://www.npmjs.com/package/nl2br
You can easily code a better one.