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).
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() );
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
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.
- The Markdown project.
- Markdown reference guide for crafting the perfect markup.
- See the complete Markdown syntax documentation.
- In-browser Markdown editor.