I guess you could call this an update of sorts to my Mobile blogging made easier post. In that post, I talked about converting Markdown text to Rich Text Format on my iPhone and iPad using Workflow so I could post the RTF text into the Squarespace Blog app, but never went into much detail as why I used the Rich Text Format option for Squarespace.
Even though Squarespace has Markdown as a default option for the text editor, it doesn’t present a blank page, but a Markdown block. If I posted the whole post in this markdown block, I couldn’t add images in between paragraphs because the Blog app saw it as one block of text, not individual paragraphs. To get around this, I would have had to add a new markdown block for each paragraph, and felt that would be too time consuming and frustrating on my iPhone and iPad. By using Rich Text Format as the default editor, I get a blank page and can paste an entire post, and still have the Blog app recognize individuals paragraphs, which allows me to add images in between paragraphs.
At that time, I was primarily using Editorial as my writing app on iOS because I could sync it using Dropbox and connect that Dropbox folder to Ulysses on my Mac, so that if I wanted or needed to write on my Mac, everything would stay synced. Editorial keeps the title of a document separate from the body, so the workflow I used simply copied the markdown text, converted it to RTF, and copied it back to the clipboard, after which I would simply paste the text into the Squarespace Blog app, add the title and any images I wanted, and publish the post.
When I heard that Ulysses was going to be coming to the iPhone, I got excited because I liked using Ulysses on my Mac and now would be able to use it on all my devices. It didn’t take me long to discover, that using Ulysses on my iPhone and iPad might would create a little more hassle when converting to RTF, because if you add a title line to Ulysses, it exports the title line with the rest of the text. I tried deleting the RTF formatted title after I had pasted the text into the Blog app, but that just messed up the formatting of the first paragraph. So instead, I would use Draft’s action extension to import the text to Drafts, delete the title, and then convert it to RTF.
Though this method worked, it was more time consuming, and I knew there had to be a better way. So I created this workflow action extension that imports the text to Drafts, and runs this Draft’s action which exports all the text starting at line 3 to Workflow, where it is converted to RTF and copied to the clipboard. (The way I write my posts in Ulysses is line 1 is the title and line 2 is blank, and line 3 is where the post actually starts.)
My first version of the workflow was formatted differently in Workflow and it worked but generated an error message in Drafts. After creating the current version of the workflow, while trying to figure out why the original version was generating an error, I was pointed to a workflow that that lets you decide how many lines to delete and whether to delete them from the start or end of the imported text. I modified it to do what I needed, and this is the final result. When it runs, it prompts for how many lines you want to delete (which is handy for posts whose title may be longer than one line) and then asks whether to delete from the start or end of the text. It takes two extra taps, but the big benefit of this workflow over the one that imports the text to Drafts, is that this entire workflow is run within Workflow and Drafts isn’t needed. I know that these workflows and actions may not be of use to many of my readers or those who use a different service to host their blogs, but as I said in my first post, I feel that they are worth sharing.