Trying to create a markdown palette

Hello,
To my surprise there does not seem to be a macro in the library to create a Markdown palette, which I want to use with the Drafts app on my Mac. The palette would always be displayed when I call up drafts.

For starters, I want to create a macro which would allow me to:
1- highlight text
2- add Markdown characters at the beginning and the end of the highlighted text (such as # only at the beginning, or * at the beginning and * at the end)

Then I can duplicate the macro to insert a variety of other Markdown characters for different types of Markdown formatting.

My idea was to highlight → copy to clipboard → manipulate the clipboard, but I can't find any way to do the above with Filter System Clipboard.

thank you

Hi again @ronald,

There are plenty of ways to manipulate the clipboard besides the Filter action :slightly_smiling_face:
Here's a simple macro and macro group that should help you get started. You will need to highlight the text you want to markdown-ify yourself, but the macro should get you the rest of the way there.

Markdown Italic.kmmacros (2.4 KB)
image

2 Likes

thanks very much. why the delete past clipboard ?

If you had a choice, question of cost aside, would you prefer to use Scrivener 3?

You're welcome. Deleting the past clipboards aren't strictly necessary, but I prefer not to have text transformations like this remaining in my clipboard history. If that's not an issue for you, you can certainly leave them out of this or similar macros without any issue.

If I had a need for Scrivener's capabilities I wouldn't hesitate to pay the cost for the upgrade, but I just don't need them at this point in time. I would certainly prefer it to, say, Word if I had a project involving a book or other long-form piece of text.