Go to content Go to navigation Go to search

Tread lightly on the things of earth

Mike’s weblog about computing, politics, and faith (a progressive view)

Tags: , , , Textpattern: Previewing Markdown in MarsEdit, Ecto2

For Textpattern blogs, I find Markdown formatting preview joy in both MarsEdit and Ecto2.

I love John’s Markdown syntax for formatting weblog entries, and almost every other kind of general-purpose text, too. There’s so little to learn — it’s deliberately almost identical to the standard text email formatting conventions I’ve used for years — and its rendered results are splendid.

For that out-of-browser weblog editing experience, I registered then kept returning to Brent’s MarsEdit and Adriaan’s Ecto2, each of which is superb, but for editing my Textpattern blogs I found no Markdown preview joy in either (until now).

Neither MarsEdit nor Ecto2 were displaying or previewing my Textpattern entries correctly because Textpattern 1.0rc2 + Chris’ XML-RPC hack reports only “Textile” as a formatting option, not “Markdown”: using Markdown in Textpattern means replacing the Textile filter with a Markdown one without necessarily changing the Textpattern webapp’s references to “Textile.” Therefore MarsEdit and Ecto2 were running Markdown-formatted text through their Textile filters, and the displayed result was usually jumbled text.

But I’ve solved my problem now in both MarsEdit and Ecto2. Clues below. Now if I could just decide which editor I like better …

(BTW, the now-successful previewed result can be made to look almost any way you like in either MarsEdit or Ecto2 by editing each one’s preview presentation template.)

Key links:

  • How to use Michel’s PHP Markdown in Textpattern in the first place

  • Chris’ wonderful XML-RPC hack for Textpattern that allows weblog editor use

  • Brent’s MarsEdit clue for displaying/previewing Markdown’d text
    (defaults write com.ranchero.MarsEdit previewWithMarkdownAlways YES)

  • My Ecto2 clue for displaying/previewing Markdown’d text follows (since I’m not seeing one published elsewhere yet):


Mac OS X (I’m using Panther 10.3.9):

  1. Quit Ecto2

  2. In a term window —
    $ cd /Applications/Ecto2/ecto.app/Contents/PlugIns

  3. $ gzip textile.perl
    $ gzip textile_1.perl
    $ gzip textile_2.perl

    $ ln -s markdown_with_smartypants.perl textile.perl

  4. Launch Ecto2

  5.  …

  6. Profit!


NOTE: Textpattern 1.0rc3, now available, or the eventual Textpattern 1.0 release may address this XML-RPC situation directly; I haven’t had time to migrate forward from Textpattern 1.0rc2 to find out.


2006-01-02 update: Most current version of XML-RPC for Textpattern 4.0.2 I know about is discussed in and linked from this thread.