Markdown Anywhere With MarsEdit

October 7th, 2013

For years, MarsEdit has supported Markdown in a manner that makes it easy to write, preview, and publish to a blog without ever dealing in HTML or Rich Text.

However, for years it has also been confusing how exactly one goes about using Markdown with MarsEdit. Because there is no explicit “Markdown mode,” many people assume there is no support for Markdown. I agree that Markdown should be more explicitly supported, but the extent of Markdown support in MarsEdit may surprise you.

To assist customers who wish to write in Markdown when publishing to their blogs, I present these guidelines for making the most of MarsEdit. Note that if you happen to want to use another markup script such as Textile or MultiMarkdown, these guidelines also apply.

Guideline 1: Edit In “HTML Text” Mode

MarsEdit supports two modes of editing: “HTML Text” and “Rich Text.” It’s important to appreciate that in Rich Text mode, everything is converted to pure HTML before publishing to your blog. There is no room within “pure HTML” for Markdown to exist. Any Markdown content will be wrapped up in pure HTML tags, which prevents the Markdown from being rendered either by MarsEdit’s preview window or on your blog.

In MarsEdit, “HTML Text” is a synonym for “unadulterated markup.” It’s called HTML Text because that’s what the majority of users understand it to be useful for. In fact, you can type arbitrary text content in “HTML Text” mode and MarsEdit will not alter it, with one exception that I’ll get to later.

In MarsEdit’s preferences, you can opt to have posts open in “HTML Text” mode by default. Alternatively, you can switch to HTML Text mode at any time by selecting Post -> Edit HTML Text.

Guideline 2: Set The Preview Filter To “Markdown”

MarsEdit supports a flexible preview system designed to simulate how your blog content will look after it is published to the site. The two main components of this system are the preview template, which consists of arbitrary HTML with placeholders for your blog entry contents, and the preview filter, which transforms the content of your post to simulate server-side transformations.

By default, MarsEdit uses a preview filter called “Convert Line Breaks,” which simulates the common behavior across many blog systems of converting blocks of text separated by two newlines into “paragraphs.” This is what enabled you to write in “HTML Text” mode with paragraph clumps, and have it appear in the preview window as paragraphs, even though strict HTML would treat those clumps as a contiguous block of text.

Markdown is also included as a built-in preview filter, so you can write your “HTML Text” using Markdown syntax, and see how it will look after your blog processes it.

Skitched 20131006 001532

This assumes your blog knows how to process Markdown. Some blog systems include Markdown support by default, but many do not. If your blog system doesn’t understand Markdown by default, pay close attention to the next and final guideline.

Guideline 3: Convert Markdown To HTML If Needed

Generally speaking I encourage Markdown fans to keep their content in Markdown format when possible. For example if you publish a long post and want to go back to make substantial edits later, it will always be preferable to have the original in Markdown format.

Unfortunately preserving content in Markdown format is not feasible for all blogs. If you are publishing to a blog system that does not recognize Markdown, and you can’t for example install a custom WordPress plugin to facilitate such recognition, you will need to see that your Markdown content is converted to HTML before publishing.

Starting in MarsEdit 3.6, a new per-blog option makes it easy to automatically convert Markdown content to HTML when you publish to a blog.


Simply check the “Apply preview filter to content” box in the blog settings for your blog, and whatever preview filter is configured for your preview window will also be applied to the content before submitting it to your blog. This is the great exception to my previous promise that MarsEdit will not alter your content in “HTML Text” mode. If you check this box, your content may be dramatically altered, but hopefully to your great delight.

Guideline 4: Have Fun

Experiment with MarsEdit’s versatile previewing system, and let me know how the Markdown support is working for you. I have ideas for improving it even further, but your feedback will help to clarify those ideas as I move forward.

MarsEdit 3.6.2: Tumblr Security Fix

July 17th, 2013

MarsEdit 3.6.2 is available now from the MarsEdit home page, and has been submitted to the Mac App Store for review by Apple.

Last night Tumblr revealed on their staff blog that the Tumblr for iOS app sends a user’s password in plain-text when authenticating for the service. They published an updated version of the app which addresses the problem by connecting to Tumblr using the secure HTTPS protocol.

MarsEdit had precisely the same flaw in the way it communicates with Tumblr, so the fix is the same as Tumblr’s: use HTTPS when communicating a user’s password to Tumblr.

Who Should Update?

If you use MarsEdit to connect to a Tumblr blog, you should update to ensure that your password is sent securely to Tumblr.

What Was The Risk?

Because MarsEdit communicated a user’s Tumblr password in plain-text across a regular HTTP connection, it was theoretically possible for the communication to be intercepted en-route and read by an untrusted person.

What Else Should I Do?

After updating to MarsEdit 3.6.2, you may want to change your Tumblr password to be absolutely sure that it has not been compromised. Starting with MarsEdit 3.6.2 your Tumblr password will never be transmitted insecurely to Tumblr’s servers.

Tumblr uses an authentication system through which clients can maintain permission to connect even after your password has been changed. To be absolutely sure that your password is secure and that no unauthorized entities have authentication tokens to your blog, I recommend visiting Tumblr’s Apps Settings Page, where you can view a list of authenticated applications and revoke access to any that you are uncertain about.

Finally, as a matter of general internet security, don’t use the same password on any two services. By using unique passwords for each of the various web services you connect to, a compromised password will only ever provide an attacker with access to a single system.

What About Other Systems?

Many popular blogging systems use authentication schemes that are less secure than they ideally would be. For example, the XMLRPC-based APIs that WordPress, Movable type, and many other systems are based upon also require clients such as MarsEdit to communicate the authentication password in plain-text to the server.

However, many of these systems also support accessing the API endpoint via HTTPS, which ameliorates the problem. If you are connecting to a blog, the HTTPS version of the API Endpoint URL should be set up for you automatically. If you are connecting to a self-hosted WordPress blog, you may need to ask your hosting providers about whether you can switch to an HTTPS URL for accessing the blog.

For WordPress-style systems, you can get a sense for whether MarsEdit is connecting to your blog via a secure HTTPS connection by examining the blog settings in MarsEdit:

Screenshot of MarsEdit's blog settings

Note that for Google Blogger blogs that although the API Endpoint URL is HTTP-based, the authentication is handled separately from that URL, using a mechanism that prevents transmitting the password as plain text over the internet.

Anything Else?

MarsEdit 3.6.2 is primarily a “one-fix wonder,” but it also addresses some minor memory-usage issues, and another subtle
Tumblr authentication issue. Here are all the changes for this release:

  • Improve security of Tumblr connections
  • Fix an issue where MarsEdit would fail to re-authenticate with Tumblr after revoking privileges
  • Fix some memory performance issues

MarsEdit 3.6: Bug Fixes With A Twist

July 2nd, 2013

MarsEdit 3.6 is now available. This is a free update for licensed MarsEdit customers. The update has been submitted to the Mac App Store and will be available there when Apple approves the update.

This update is primarily a “bug fixes” release, that is to say, no new features. However, I am allergic to version numbers such as “3.5.10”, which was where MarsEdit was heading. I decided to jump to 3.6 with this release, on the basis of a bug-fix change with wider implications:

MarsEdit can now apply the preview filter as part of the publishing process.

This is primarily of interest to folks who write in HTML Text mode with a text filter such as Markdown, but publish to a blog that doesn’t support it natively. Now you can check a box in the blog’s settings to ensure that the preview filter runs when you publish, causing for example the Markdown content to be converted automatically to HTML as part of the publishing process. Given that MarsEdit supports custom preview filter scripts, the sky is the limit for how you choose to manipulate your post content as part of the publishing process.


Generally I strongly encourage folks to set up their blogs in such a way that Markdown can be used natively and preserved for later editing, but this is not always possible. This is a great option for folks who want the convenience of writing in Markdown but need to publish in HTML.

The change was actually made to address a change of behavior with Blogger, where historically plain text separated by newlines was automatically converted to paragraphs. They changed this behavior sometime in the past few months, so that the paragraphs are “crunched together” if you write in HTML Text mode and were relying on automatic line breaks. Using the new “Apply preview filter” feature, you can work around the bug by causing MarsEdit’s default “Convert Line Breaks” filter to process the content of your post as it is being published.

There are a number of other bug fixes in this release. Complete change notes below:

  • Restore auto-configuration functionality for Blogger/Blogspot blogs
  • Fix a bug where an authentication dialog was not appearing for some LiveJournal and Squarespace configurations
  • Fix a bug that prevented Flickr short-name being used in Flickr page links
  • Fix a bug that prevented undo from working in some editor fields
  • Fix a bug that allowed rich text to be pasted into Tumblr quotation text field
  • Fix a bug that caused Tumblr quotation source text to be treated as plain instead of as HTML
  • Fix a bug where new image albums for Blogger were created with public permissions
  • Fix a cosmetic glitch with the Date Editor panel


Update: 3.6 had a bug that caused the flagship “apply preview filter” feature to fail on some blog types including WordPress and Movable Type. 3.6.1 is now available and should address the problem.

Blogger Auto-Configuration Failures

June 19th, 2013

Recently something changed in the format of Blogger blogs such that MarsEdit’s method of “auto-configuring” is now failing. This does not affect existing configurations in MarsEdit, but any new Blogger blog added to MarsEdit will fail to connect with a cryptic “Invalid Blog ID” error.

I’ve added a workaround of the problem to the Red Sweater Forums. The long and short of it is the “API Endpoint URL” and “Blog ID” fields in MarsEdit’s configuration need to be manually corrected.

I am working on a permanent fix for the next update to MarsEdit.