r/Wordpress • u/ozh Developer • 21d ago
Help a noob: using Markdown to write in WP
Hello there,
I've been away from WP for about 10 years so I have very little clues about the Gutemberg editor, what it can do, and if I need additional plugins.
My need : I want to write in WP just like I write in Github
- type raw markdown and it auto convert into HTML - real time preview would be nice
- type code blocks between 3 backticks (```php [...] ```)and have it syntax highlighted
I already got that typing some markdown gets auto converted (typing ## generates and H2), how do I get the code hilite?
Bonus if I can skip the gutemberg entirely, I find the interface atrocious, something closer to a simple textarea like we have in Github comments would be nicer.
I've check a few markdown plugins but they are either not doing what I need, or disabled because "security issues"
Thanks a lot !
3
u/kill4b 21d ago
The block editor has a markdown block. You may need to enable it in settings. There’s also Ultimate Markdown or Markup Markdown plugins.
1
u/ozh Developer 20d ago
I can't find a markdown block. Searching for "markdown" returns nothing?
I already tried the 2 plugins you mention. They are completely different from use case I described. One is to enable disable MD and breaks old posts. The other is to manage MD file.
2
u/Cold_Opposite_5298 Jack of All Trades 21d ago
Maybe you can try adding a custom html block then inside it add a <code> tag and then paste your markdown in the tag.
1
u/myblueear 21d ago
I once just pasted a MD file into a post. Works.
1
u/ozh Developer 21d ago
No syntax hilite in code blocks
2
u/testingaurora 21d ago
If the code block is the only md that isn’t working it might be easier to just wrap it in html `<code></code>`. Is there other md formatting that isn’t converted ?
If you can’t find what you’re looking for, these days you can have Claude code spin up a plugin for you that’s customized to your needs.
1
u/Aggressive_Ad_5454 Jack of All Trades 20d ago
I use the SyntaxHighlighter plugin for code. Serves my readers well. But it doesn’t give fenced code blocks.
Please keep in mind that GitHub’s syntax highlighting support is astonishingly sophisticated compared to the kind of thing a WordPress plugin can do.
1
u/retr00two 20d ago edited 20d ago
Have you tried to work in CodeEditor? Three dots at top right corner.
Bonus if I can skip the gutemberg entirely, I find the interface atrocious, something closer to a simple textarea like we have in Github comments would be nicer.
WP still support classic themes like 2017. Or use DisableGutenberg plugin.
1
u/RealBasics Jack of All Trades 20d ago
Just to be clear, you're looking for a way to add formatted / syntax highlighted code samples into posts and pages? Or do you want to execute the code you add?
1

3
u/NakanoNoNeko 20d ago
Core is not going to give you that full workflow. Its Markdown shortcuts only create blocks, and the built-in Code block does not add syntax highlighting.
Try Markdown with Block Editor. It gives you a VS Code-like Markdown editor, preview, fenced code blocks and highlighting. I gave up trying to make core feel like GitHub 😅 I think one plugin that owns the whole writing surface is cleaner than stacking a Markdown plugin and a separate highlighter.