I use two beautiful macOS and iOS apps, Byword and iA Writer, to write in Markdown and convert what I’ve written to HTML. But I wanted to create a shortcut to convert Markdown to HTML from any app (say, from BBEdit or TextEdit). And so I made one, even though I had very little idea what I was doing. I don’t know if this shortcut is the most efficient one to convert text, but it works:
In the Mac Shortcuts app, click the + sign to create a new shortcut.
From the array of actions on the right:
Search for Copy to Clipboard and drag that item into the workspace. Make the variable Shortcut Input.
Search for Make Rich Text from HTML and drag that item into the workspace. Change the variable to Clipboard.
Search for Make HTML from Rich Text and drag that item into the workspace. Change the variable to Rich Text from Markdown.
Search for Copy to Clipboard and drag that item into the workspace. Change the variable to HTML from Rich Text.
Click on the ⓘ (information symbol, top right) and check Show in Share Sheet, Use as Quick Action, and Services Menu. Add a keyboard shortcut if you like.
And add a name before you’re done (top left). I chose Markdown → HTML.
The finished shortcut looks like this:
[Click for a larger view.]
Don’t ask me about Receive Any ... line. The Shortcuts app added it.
To make the shortcut work, just highlight a stretch of text written in Markdown and use your keyboard shortcut, quick action, or the services menu.
Shortcuts work in macOS, iOS, and iPadOS, so this shortcut will be available from the share sheet on a phone or tablet.
[The lunacy of the news sometimes makes me think small.]
Friday, May 1, 2026
A Markdown to HTML shortcut
By
Michael Leddy
at
6:28 AM
Subscribe to:
Post Comments (Atom)

comments: 0
Post a Comment