How does WordPress convert Markdown string to HTML string?

The default WP editor does not accept markdown, you must be using an add-on editor through your theme or plugin. For example, the markdown accepted in these forums is managed by a modified version of bbPress. Your question would be best answered by the devs of the responsible module. There is typically a dedicated support channel you can use for that.

You can investigate how the article is saved in the DB by checking the data through phpMyAdmin (usually accessed through your hosting control panel). If you see HTML there, obviously the conversion is done before writing to the DB. If you see markdown still, the conversion is probably done through code added to “the_content” filter. This allows themes and plugins to process content before output.

@bcworkz Thank you, bcworkz!

I found that some editor plugins such as WP Githuber MD store HTML string, while some such as Parsedown Party store Markdown string.

Moreover, it’s the editor plugin, not the theme, that converts markdown string to html string.

  • This reply was modified 6 days, 8 hours ago by uanaoeng.
  • This reply was modified 6 days, 8 hours ago by uanaoeng.
  • This reply was modified 6 days, 8 hours ago by uanaoeng.



Source link