Writing WordPress posts in Markdown

WordPress allows you to write your posts using Markdown. This feature is available using Jetpack. If you write some of your eBooks or other documents using Markdown, and need to transfer some of the same content to a WordPress blog than this feature is extremely useful. No need to again create a different HTML version of the content.

Enabling Markdown support in Jetpack

From the Jetpack section in your WordPress admin, go to Settings → Writing → Composing and activate the Markdown module.

Once Markdown is activated, it is enabled for posts and pages and available to all users on your blog. An important note: when writing with Markdown, make sure you always use the Text editor and not the Visual editor. The Visual editor may cause unexpected results with Markdown.

Writing with Markdown

If you have never used Markdown than the best introduction is at markdownguide.org. Jetpack uses the ‘Markdown Extra‘ version by Michel Fortin which includes some additional features not originally available in Markdown, including improved support for inline HTML, code blocks, tables, and more.

Inline HTML support is specially interesting as it lets you add HTML tags in your Markdown text or add Markdown inside HTML tags. This is useful when you need some features not provided by the Markdown syntax but which are easy to do with HTML.

<div markdown="1">
This is *true* markdown text, inside a HTML tag.
</div>

On rendering the above the markdown=”1″ attribute will be stripped and the ‘div’ tags content will be converted from Markdown to HTML. The end result will look like this:

<div>
<p>This is <em>true</em> markdown text, inside a HTML tag.</p>
</div>

Check the WordPress Markdown quick reference and the Markdown extra reference. If you are unfamiliar with Markdown see the Markdown demo.

One thought on “Writing WordPress posts in Markdown

  1. I recommend Mytory Markdown or Mytory Markdown for Dropbox. It is a plug-in that parses the Markdown file outside and puts it into the WordPress editor. It’s simple and powerful. The markdown file can be kept outside of WordPress. Plugins can be removed at any time. Even if you remove the plugin, the content of the wordpress database remains intact, and there are no side effects.

Leave a Reply

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