Markdown Tables in Ulysses on iOS

After hearing much about Ulysses from people whose opinions I trust, namely Federico Viticci, I decided to give it a try for a writing project. This post is a slight distraction aside in the midst of that project.

As I was writing, I figured it would be best to lay out some data in a table. Unfortunately, the Markdown variants supported by Ulysses don’t support a MultiMarkdown-like syntax for tables.

That’s where iOS comes in. More specifically, that’s where Workflow shines. I figured I could meet my needs using a combination of a Workflow action extension and Ulysses’ Markdown XL raw source syntax (~…~). The Workflow I created takes Markdown-formatted text, converts it to HTML and places it on my clipboard. While I aim to use it to create HTML tables, you could technically use this workflow in any instance where you need to convert Markdown to HTML via an action extension.

Here’s how it looks:

  1. I create a MultiMarkdown-formatted table.

    Screenshot of a sheet in Ulysses with a block of MultiMarkdown table-formatted text.
  2. I select the block of text and hit the share button.

    Screenshot of a sheet in Ulysses with a block of MultiMarkdown table-formatted text selected, displaying the iOS text action pop-up.
  3. I run the workflow.

    Screenshot of the Workflow action extension running my workflow to convert the MultiMarkdown-formatted text to HTML code.
  4. I paste and replace the text with the HTML code on my clipboard.

    Screenshot of a block of HTML table code, which was pasted from the clipboard to replace the MultiMarkdown-formatted table text.
  5. I wrap the HTML code with Ulysses’ raw source syntax (~…~)

    Screenshot of HTML table code wrapped in Ulysses’ syntax for raw source.
  6. Voilà.

    Screenshot of a formatted HTML preview of the Ulysses sheet, displaying the table code rendered appropriately.