Writing Markdown with Editorial

Since last time I updated, I’ve been playing with a new (to me) iOS app called Editorial. It is, put simply, a Markdown-based text editor which can sync with Dropbox, which is well-designed and very nice to use, and for some, that will be more than enough reason to give it a look.

However, perhaps you’re familiar with Python, or a fan of Automator on OS X, and that is where Editorial becomes even more relevant to your interests. This is because Editorial has support for workflows, which can be written in and run from the app, and these workflows can include scripts in Python. Written by the same developer as Pythonista, Editorial makes it very easy to take your Markdown documents and do cool things with them, either by using workflows with the built-in Automator-style actions or by harnessing the power of Python.

To give you an example of the power of Editorial, let me tell you all what I spent my Tuesday night doing. I found a workflow on the Editorial Workflow Directory that allows the user to post the current document to a WordPress site, and decided to have a go at writing something that would make my life easier. I embarked on a quest to write a similar workflow for posting to LiveJournal.

Now, full disclosure: as part of my day job, I spend a lot of time coding in IDL, but I’ve never really written anything in Python before, and I’ve never used anything that involves XML-RPC before, and I’ve never written any code involving blogging or LiveJournal before. With just a little Googling, a lot of distress at how awful LiveJournal’s documentation is, and some luck, I put together a workflow in Editorial that allows me to easily post to my LiveJournal, and even gives me pop ups showing me my list of tags and a list of moods to pick from. Now, obviously, this might be less useful for some (most) of you than it is for me, but it’s a good example of how easy putting things together in both Editorial and in Python can be!

All in all, I can’t recommend Editorial enough. It feels like the Markdown editor I’ve been waiting for on iOS.

Further notes on Markdown and WordPress

For a long while, my blog post on one of Amanda Palmer’s Kickstarter projects was my most popular blog post, thanks in no small part to AFP herself tweeting a link to it, providing a very nice uptick in my hits for the day! However, a different blog post recently overtook it — I am, as you’ve almost certainly worked out from this post’s title, talking about my previous blog post about using Markdown with WordPress, which I’m happy to see is proving to be useful to so many people.

However, things have changed in the way I use Markdown with WordPress since then. Michel Fortin has announced that his PHP Markdown Extra will no longer be updated as of 1 January 2014. He’s introduced PHP Markdown Lib 1.3 to replace it, partly because he no longer wants to maintain the WordPress elements. This is fair enough, but it introduces a fly to the ointment. One annoying thing about PHP Markdown Extra is that, if you have it installed on WordPress but then deactivate it or uninstall it, your blog no longer knows how to handle Markdown. This results in all of your blog posts displaying raw Markdown, rather than the HTML that they should show to visitors. Therefore, when a plugin is depreciated, it can be a real pain in the backside to get everything back to where it was.

As a result, as a WordPress user I have been casting around for a replacement for PHP Markdown Extra that won’t create the same problem if you need to deactivate it. I am here to tell you I believe I’ve found something that fits the bill perfectly.

An image showing the Markdown on Save Improved pane in the WordPress editor.

I’d like to recommend Markdown on Save Improved as a solid replacement for PHP Markdown Extra on WordPress. It addresses the concern I’ve outlined above very elegantly, by maintaining the database of Markdown separately to the database of blog posts. This means that if you write a blog post in Markdown and then uninstall it, the blog post will still display as HTML to the audience of your website — obviously a huge improvement over the ‘naked’ display that could occur with other Markdown plugins.1 Markdown on Save Improved is maintained by Matt Wiebe, who works for WordPress.com’s parent company Automattic — which presumably means he knows his stuff — and uses PHP Markdown Extra to parse Markdown, so it should produce identical output.

Markdown on Save Improved has one major drawback: when I installed it, it didn’t know which of my posts were Markdown and which were not, so I had to trawl through my database and hit ‘Update’ on each post. Whilst this isn’t a huge problem for someone like me who has a relatively small number of blog posts, someone who has more might find it a little clunky. Also, it assumes that you want to use Markdown every time you create a new blog post; perfect for me, but not great if you don’t want it to do that.2

What else has changed about my use of Markdown in the time since I wrote my original post? Whilst I’m still using the same beloved TextWrangler to edit my Markdown, I’m now using it in conjunction with the excellent Marked, which works with any text-editing app. The way it works is simple: you set your .md files to open in Marked, and then when you open them you see the rendered text displayed. Hit ⌘E and it’ll open the source in your editor of choice. Whenever you save the file in the editor, not only will Marked update the display, but it’ll indicate the paragraph of your latest edit so you can instantly focus on where your changes are appearing. It’s an incredibly elegant and useful app, and a snip at £2.49 on the Mac App Store.

So, in summary, go check out Markdown on Save and Marked. Both are incredibly useful tools that will make your Markdown even easier to write than it is at the moment.

A screenshot of this blog post and what it looks like in Marked.


  1. It’s also, I think, a huge improvement over WP-Markdown, which converts your Markdown to HTML when you save a blog entry and then converts that HTML back into Markdown when you come back; there are a couple of threads on that plugin’s support board that complain about this process badly mangling their Markdown and making it much harder to work with. 
  2. There is an alternative plugin called Markdown on Save, coded by Mark Jaquith, which is the plugin that Improved is based upon. This means you turn the option on for each blog post, rather than having to turn it off for each one. It’s prettier, but it contains a bug which causes footnotes to break on any WordPress page which displays more than one blog post (such as the front page or any category’s page). That’s why I’m not using it. 

Using Markdown with WordPress

Since writing this article, Michel Fortin has announced that he is going to stop including WordPress plugin functionality in Markdown Extra. Click here to read a more recent article that explains how to cope with this news.

I’ve noticed that I’ve been getting hits for Markdown-related searches on Google, ever since I wrote a blog post about the browser extension called Footnotify. When I saw Footnotify I instantly knew I wanted to have that functionality on my own website, and so I started searching for a WordPress plugin that provided footnotes. Eventually, I decided that it would be worth using Markdown to achieve this effect, after seeing the footnotes on Daring Fireball, and set about getting this arranged.

The first step was finding a way to install Markdown on WordPress1. I searched on the website for an extension to do this, but couldn’t find an ‘official’ one, so I searched on Markdown-Discuss (the mailing list set up by John Gruber) to see whether I was mistaken. It turned out I was, although the plugin that I’d recommend isn’t listed on the WordPress website: since WordPress is based in PHP, and since Michel Fortin has written Markdown Extra for PHP, one can just download PHP Markdown Extra from his website and upload it to WordPress as a plugin.

A screenshot of an FTP client displaying the file path of PHP Markdown Extra in my WordPress configuration.

The process is easy. Once the zip file has downloaded, simply unzip it. You’ll be presented with a folder containing three files: two in .text format (one of the accepted file extensions for plaintext files that contain Markdown syntax) and one PHP file. I renamed the folder to php-markdown-extra and then uploaded it to my WordPress installation (the filepath is wordpress/wp-content/plugins). WordPress then sees this as a plugin, and so you’re ready to roll!

But what should you use to edit your Markdown text? Initially, I tried a Mac app for Markdown called Valletta, which didn’t impress me. One of the key features of Markdown that I adore is its ability to turn -- into — and turn 'typewriter quotation marks' into ‘typographic quotation marks’. Valletta doesn’t implement this part of Markdown, so I don’t recommend it. However, the beauty of Markdown is that it’s just plain text with specific syntax, and so you can feel free to use the plaintext editor of your choice. Personally, I flit between Textwrangler, on the Mac and Notepad++, on Windows. Both apps can be configured to highlight Markdown syntax2, and I’m actually using TextWrangler to write this post.

A screenshot of this article, being rendered by Elements, the iOS plain text editor.

Although I don’t use a specific app on my computers, I have http://www.mindanews.com/buy-inderal/ found a rather good app on my iPhone. An iOS app by the name of Elements, it started life as a simple plaintext editor that supported Dropbox as a filesystem, but has since gained the ability to preview Markdown-formatted text and also copy the HTML generated as a result, for use in other apps.3 Elements is really good in a variety of ways: Dropbox sync is chief amongst them, but the ability to choose what file extension you give to Markdown files is also a very nice touch. It allows you to choose which folder on your Dropbox you want to synchronise4, too. Find it on the App Store here (£2.99/$4.99).

Lastly, let’s return to Footnotify. Markdown Extra allows for easy footnote creation, and Footnotify complements this brilliantly — I use both the Chrome extension and the JavaScript that provides the overlays on this blog. It will work whether you’re using Markdown on your blog directly or generating footnotes on your own. If you like what it’s doing for your browsing experience on my blog, you should definitely download it and give it a try with your own website!

I am glad that I got the desire to try Markdown because I feel it really has enhanced my writing. For me, the main benefits are the syntax, which makes certain tasks (bullet points, linking, footnotes) much easier. For the reader, the better formatted text brings something to the design of the website, whereas the footnotes mean that my frequent desire to wander off the topic is nowhere near as aggravating as it might be. I’d definitely recommend Markdown to anyone who writes online, even if it’s relatively infrequently.


  1. If you’re using WordPress.com, installing plugins is not possible and so this won’t apply to you — sorry! However, you can still use a Markdown app to export HTML and paste it into WordPress, so keep reading. 
  2. Notepad++ may need you to roll a user-defined language definition, but there are such things available online. There’s even this handy article on how to generate HTML from Markdown
  3. I mostly use this feature when posting to my LiveJournal, but if you’re running a WordPress.com blog then it will also be very useful! 
  4. I have all my text files in a folder called PlainText, named after the free editor that also syncs with Dropbox. I recommend that one, if you’re just looking for an editor without Markdown editing. Find it on the App Store here (free). 

Footnotify and a site redesign

Recently I found a really cool Chrome extension called Footnotify, which takes footnotes (as you see them on Daring Fireball or Wikipedia) and renders them as a hovering box when you click them. If you are a regular reader of either site (or, indeed, a plethora of others) you too might find it handy.

The extension’s elegance and ease of use made me want to put footnotes on my website, too, and so I started fiddling with various footnote extensions for WordPress. Eventually, I got a little disillusioned, since none of them were working quite how I wanted — as a result I sought out PHP Markdown Extra, which includes footnotes and also a host of other neat ways to write online. It’s based on the syntax developed by John Gruber, who runs Daring Fireball, and so the footnotes it generates are guaranteed to work with Footnotify, right?

Wrong. The WordPress theme I was using completely screwed footnotes up, and so I went hunting for a new one. I had been using The Unstandard, which is the theme I’ve successfully implemented and used over on the Leicester Sabres website. It’s a very good theme that’s very visually powerful — for the Sabres, that means that we draw people into the site and get them reading. However, I don’t really do my website for the hits, and so I’m unsure that the very visual theme was suitable. I ended up looking for a new, simple, one-column theme1 and eventually found Blaskan, which is now in use on the site.

As a result, I’ve installed a new plugin ([Markdown Extra]) and installed a new theme (Blaskan). However, they aren’t the only changes, since Blaskan also has good support for smartphones and as a result I no longer need the plugin that enabled the mobile view I previously employed. Good news all round!

There’s one small problem — for some reason, Footnotify doesn’t work properly on the individual blog entries. If you click a footnote on the main homepage it’ll work fine, but on the page for this post, it’s broken. I installed the JavaScript that enables it on a website, in case having it on the site rather than as a Chrome extension was helpful, but that hasn’t changed anything; I’ve gotten in touch with the author and hopefully this will eventually be resolved.

Edited to add: Initially, I had a problem with Footnotify. It would work fine on the homepage, but on the entries’ pages themselves, it didn’t work correctly. After sending a missive to Michel Fortin, I was able to identify it as an issue with a plugin on my website. Something was causing the relative footnote links generated by [Markdown Extra] to become absolute links, and thus breaking the Footnotify plugin. After some trial-and-error, it turns out that it was an issue with Joost de Valk’s Google Analytics for WordPress plugin. I visited de Valk’s website, where I read:

For plugin support, please use the appropriate support forums on WordPress.org. Plugin support emails will be immediately discarded. The only reason the option in the contact form below is there, is so I can more easily filter away those emails for those who don’t bother to read this text.

As such, I couldn’t be bothered to notify him of the bug in his plugin, and am instead using a plugin called Google Analytics which is much simpler to configure and works perfectly for what I need it to do. And now, footnotes work how they should — hurray!


  1. The eagle-eyed amongst you will have noticed that this theme is not one-column, since it has a sidebar. You’re entirely correct to notice that, but Blaskan can be configured to be one-column and so appears in several lists of such themes.