Parse Markdown WordPress Plugin

Written by
Published
Typical Read
2 minutes
Find your next web developer job
Drupal Web Developer at On Fire Media (San Antonio, TX)

Integrate Markdown into WordPress comments with the Parse Markdown plugin. A simple, no configuration-required, standards-driven plugin that allows commenters to use Markdown markup in their comments.

Parse Markdown WordPress Plugin

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:

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_modeBoolean. Processes untrusted user-input. Defaults to true.
  • escapedBoolean. Escape HTML in trusted input. Defaults to false.
  • inlineBoolean. 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

What is Markdown?

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.

What is Markdown vs. markup?

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.

Does WordPress support Markdown?

Yup, with the Parse Markdown WordPress plugin.

Can you use the Parse Markdown WordPress plugin in a theme or another plugin?

Yes. Just initialize the Parsedown class and process content as needed.

Is Parse Markdown compliant with CommonMark?

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.

More WordPress plugins by — me.

Did you find Parse Markdown WordPress Plugin useful? Get articles in your inbox.

…and don’t worry, I hate spam as much as you. Expect to hear from me at most once a week.

Share on facebook
Share on twitter
Share on linkedin
Share on reddit
Share on facebook

Stay updated.

Get a weekly email with the latest trends in web development & SEO.

Write a guest post.

Have an interesting article or idea? Become a guest blogger & pitch me your concept today.

Join the conversation.

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

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.