My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

How should markdown be saved and rendered?

Yashu Mittal's photo
Yashu Mittal
·Jan 27, 2020

Looking for the best way to save markdown to a database and then render inside DOM.

  • Should the raw markdown be saved as a string into the database and then returned and converted to HTML before rendered on the front end?
  • Should the markdown be converted to HTML and then saved as a string into the database? Then it could just be passed onto the front end as raw HTML.