Store post in raw markdown format, no html?

Is it possible to store posts in pure markdown format? so that I can retrieve the content through the REST API and get the markdown code, without any added html?

Topic rest-api markdown plugins Wordpress

Category Web


You can try remove_filter( 'the_content', 'wpautop' ); to remove the added HTML tags.

https://codex.wordpress.org/Function_Reference/wpautop


You have to do two things

  1. Completely disable visual editor
  2. enable Markdown.

Disable Visual editor: Add this code in the themes function.php file or as a plugin.

add_filter( 'user_can_richedit' , '__return_false', 50 );

Enable Markdown: Install this plugin Wp-Markdown

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.