Markdown for WordPress


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:

file

Create a post at Post > Add New, you will see the MD editor:

file

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:

file

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:

file

And you could enable MD editor by Enable Markdown:

file

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:

file

Note: You could set to only show the excepter at Settings > Reading.

You could enable it on the top of post:

file

Then it works.


Leave a Reply

Your email address will not be published. Required fields are marked *