
Parse Markdown WordPress Plugin
Keep your comments looking sharp while giving users the ability to highlight code within them with the Parse Markdown WordPress Plugin. It’s a simple, light-weight, standards-driven WordPress plugin that makes parsing Markdown a cinch.
How it works.
The Parse Markdown plugin uses the Parsedown PHP library to convert Markdown content to HTML markup. Some features include:
- Extremely light-weight & super fast
- Requires PHP v5.3+
- No dependencies required
- Supports Markdown Extra
- Uses the GitHub flavored markdown specs
Parse Markdown tries to read Markdown like a human. First, it looks at the lines. It’s interested in how the lines start. This helps it recognize blocks. It knows. For example, if a line starts with a – then perhaps it belongs to a list. Once it recognizes the blocks, it continues to the content. As it reads, it watches out for special characters. This helps it recognize inline elements (or inlines).
Usage.
Parse Markdown just works. No configuration needed. Just install, activate, and enjoy.
Custom theme and plugin integration.
You can easily integrate the Parse Markdown WordPress plugin in any theme or another plugin to allow Markdown markup anywhere on the site. It’s easy as using the parse_markdown
function. Check out the example below:
parse_markdown( $string, $args = array() );
Available arguments:
safe_mode
– Boolean. Processes untrusted user-input. Defaults to true.escaped
– Boolean. Escape HTML in trusted input. Defaults to false.inline
– Boolean. Parse inline markdown. Defaults to false.
When escaping HTML, be aware that this allows users to insert unsafe scripting vectors, such as links like [xss](javascript:alert%281%29)
.
Parse Markdown FAQ
Markdown is a lightweight markup language with plain-text-formatting syntax, created in 2004 by John Gruber with Aaron Swartz. Markdown is often used for formatting readme files, for writing messages in online discussion forums, and to create rich text using a plain text editor.
Markdown is a play on words because it is markup. “Markdown” is a proper noun. Markup is a general term for content formatting – such as HTML – but markdown is a library that generates HTML markup.
Yup, with the Parse Markdown WordPress plugin.
Yes. Just initialize the Parsedown class and process content as needed.
It passes most of the CommonMark tests. Most of the tests that don’t pass deal with cases that are quite uncommon. Still, as CommonMark matures, compliance should improve.
Markdown resources.
- The Markdown project.
- Markdown reference guide for crafting the perfect markup.
- See the complete Markdown syntax documentation.
- In-browser Markdown editor.
More WordPress plugins by — me.
- Pardot Marketing — Integrate Pardot into your WordPress site, Elementor support included.
- Referrer Analytics — Get detailed information about where your users are coming from.
- WordPress Zero Spam — put a stop to WordPress spam.
All comments posted on 'Parse Markdown WordPress Plugin' are held for moderation and only published when on topic and not rude. Get a gold star if you actually read & follow these rules.
You may write comments in Markdown. This is the best way to post any code, inline like `<div>this</div>` or multiline blocks within triple backtick fences (```) with double new lines before and after.
Want to tell me something privately, like pointing out a typo or stuff like that? Contact Me.