How to use MD in post or page, and switch between block editor and MD editor.
Install MD Editor
Install plugin WP Githuber MD, and active it:
Create a post at Post > Add New
, you will see the MD editor:
The MD editor is ready, however we could do a little settings.
Past Image from Clipboard
Click Settings > WP Githuber MD > Modules > Image Paste
to enable you to past image:
After enable it, you are able to paste image from your clipboard.
You could also download remote images to local library at Settings > WP Githuber MD > Markdown > Meta Boxes > Fetch Remote Image
.
So how to switch to block editor?
Switch MD and Block Editor
You could deactive the plugin or click the Enable Mardown
button to disable MD editor:
And you could enable MD editor by Enable Markdown
:
Note: You could enable
Mermaid
to draw flow chart in MD.Note: To enable a copy button for code, please enable
Copy to Clipboard
.Note: Please enable
Syntax Highlight (highlight.js)
for syntax.
I also tried MD editor of Jetpack
, it supports write MD in block editor, but not full text MD.
Shortcode
We could also use shortcode in MD, for example, use srs_player:
The code is bellow:
[srs_player url="https://r.ossrs.net/live/livestream.m3u8"]
You could also disable it in Settings > WP Githuber MD > Preference > Shortcode
.
Excepter
For MD editor, the exceptor is under the editor:
Note: You could set to only show the excepter at
Settings > Reading
.
You could enable it on the top of post:
Then it works.