Hello @mnorin, and also @hrw – Happy 2019!
Here’s what I understand of Gutenberg/Markdown at this time – and none of this comes from an official source, it’s just trial and error by me, but it seems to be correct:
ONE
It’s true that you cannot natively write in Markdown in Gutenberg. But in a way that’s the wrong way of thinking about it, since this is a BLOCKS editor. As @karmatosed stated above, what we actually want is a Markdown Block.
TWO – MD 4 WP History
Once upon a time, there was something like 20 different Markdown plugins for WP. I tried a lot of them and they all seemed to have issues. Perhaps they were out of date. Then Jetpack added a Markdown module. The good news is that it worked better than any other Markdown plugin I’d tried. The bad news is that it seems like having a large player like Automattic/Jetpack in the game led to the demise of all the smaller plugins. Other than one that ports the Jetpack Markdown Module out of Jetpack (for stand-alone use) I don’t think there are any MD Plugins in the repository anymore.
THREE
Jetpack has updated with a Markdown Block. The good news is that if you install JP and turn MD on, you’ll have a new MD block type. It will work just as you’d expect.
MD will not work in a Paragraph block, or in an HTML block, but it will work in any MD blocks that you place.
The bad news is that when Jetpack updated to Gutenberg, it added Markdown blocks, and took out MD for the Classic editor. So if you install Classic Editor for WP 5+, you won’t be able to write in Markdown at all.
The other bad news is that all of your old posts will have all of their MD converted to HTML. If you tried to have clean, easy to read content, it’ll be messier now.
BTW, if you have a page in HTML and you want to convert it to, or back to, MD, “Turndown” by Dom Christie is pretty cool:
https://domchristie.github.io/turndown/
The other-other bad news is that if you like to use internal links for things like in-page TOCs, it’s semi-broken.
As far as I can tell, any
ID=”name”
links inside Markdown Blocks won’t work. In traditional Markdown, you can always use HTML, but I think in the new Gutenberg/Jetpack/Markdown you can ONLY use MD and NOT HTML in an MD Block.
You can still get this functionality, but it’s messier than it used to be. The way I’d do it now is to have:
HTML TOC Block
Any number of HTML Header Blocks w ID tags
Markdown content blocks interleaved with the header blocks.
Your HTML TOC Block will correctly link down to any of your HTML Header blocks with ID tags.
I don’t think there is any way to use ID=”name” in an MD Block. Not to jump within the block nor to jump to the block. So what would have simply been one page of mixed MD & HTML in the past will now be a page of many interleaved HTLM & MD blocks.
The new way seems clumsier but really isn’t bad. It does offer a chance to insert header banners (a rectangle with a colored background for a bit more graphic emphasis) for major headings and using either Reusable Blocks, or the Block Duplicate, it can be kind of handy for formatting.
That’s what I know so far!
Happy writing!
~ Glenn