plugins - Store post in raw markdown format, no html?

admin2025-06-03  3

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?

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?

Share Improve this question asked Jan 31, 2019 at 13:58 GWorkingGWorking 16510 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

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

https://codex.wordpress/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

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748955692a315134.html

最新回复(0)