Michel Fortin Here

Weblog on Friday December 30, 2005

Markdown and Wordpress 2.0

WordPress 2.0 has a new “rich” visual HTML editor which generate HTML markup directly. This editor should work fine alongside Markdown, but Markdown-formatted text won’t work in this new editor. You can tell the rich editor is active when there are icons for bold, italic and other functions above the text editor. To edit Markdown text, you need to deactivate the rich editor. Here’s how.

There are two places you can deactivate the editor. Each user can activate or deactivate it from the “User” section of the administration interface: uncheck checkbox “Use the visual rich editor when writing” at the bottom of the page. You can deactivate the rich editor for new users from Option > Writing > “Users should use the visual rich editor by default” checkbox.

If you want to use the rich editor again, no problem, you can reactivate it and use it at anytime. But then you should make sure the rich editor is disabled before editing a Markdown-formatted post.

Also note that WordPress 2.0 official distribution does no longer include the Markdown plugin. You’ll have to get it from the PHP Markdown project page.

Discussion & Comments

Matt Sunday January 1, 2005 at 00:11

Thanks for this information.

Darryl Tuesday January 3, 2006 at 15:24

So in other words I can never edit my markdown formatted posts again unless I remember this little trick?

Michel Fortin Tuesday January 3, 2006 at 19:35

As you said. If you haven’t deactivated the “rich” editor, to edit older Markdown-formatted posts you’ll need to reformat your post using the new editor instead of Markdown. Or you can remember to deactivate the “rich” editor.

Maybe an updated version of Text Control for WordPress 2.0 will see the day and solve that issue. Until then this “trick” is the best thing I can give you.

Emil Kampp Friday January 13, 2006 at 16:56

Is there a call-back function in the markdown.php ? That converts the <h1>head</h1> back to #head ??

Michel Fortin Sunday January 15, 2006 at 00:07

Emil, you can’t get back the original text because Markdown to HTML conversion is lossy: there are two syntaxes for headers, many more for links, and they produce the same HTML output. But you can try HTML2Text — a Python script by Aaron Swartz — if you want to see something close.

Also see the French discussion about this entry.

Discussion is now closed for this entry. Feel free to contact me if you have something interesting to say.


Site powered by: Reflex