Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

daigo's avatar

Saving content as Markdown or HTML

Hi everyone,

I wonder which approach you use to store content in your database: Do you save the text in markdown format or directly as HTML. And why do you do so?

Is the only advantage of saving content as markdown because of the possibility to parse it later to anything I want, so that I'm more flexible?

And how do you handle the input? Does your client need to know the markdown syntax or do you use a WYSIWYG-editor (ckeditor or something similar)?

Thanks in advance!

0 likes
3 replies
RachidLaasri's avatar

I prefer storing the markdown so you can parse it or show it as it is when editing the post.

And as a response on the second question, it depends on what you are building, if you are creating a site for developers using a markdown is fine, but if you are building a site for normal users i prefer using WYSIWYG-editor and storing the post as HTML.

daigo's avatar

I would prefer storing the content in markdown format as well, but I don't want my clients (non-devs) to learn the markdown syntax. They mostly use MS Word, thus they know how to format text by selecting it and click the [b]old-icon to make it bold etc.

What are you feelings and/or experiences with "teaching" markdown to non-dev clients?

michaeldyrynda's avatar

I store markdown as markdown - it gives you the flexibility to format it as needed, or edit it as plain text in your forms.

Markdown is trivial to learn and once yor users learn it, I'm sure they'll love it. It's much quicker and simpler than messing around with a mouse.

They only need to remember a few things like asterisks for bold or italic, headings with a pound symbol or three, lists and links are a breeze.

Parsing and saving as HTML then parsing it back to markdown when you want to edit? No thank you!

1 like

Please or to participate in this conversation.