MACRO: Create Rich Link from Markdown Link

I recently discovered Copy as Markdown Link (by @ComplexPoint). It populates the System Clipboard with Markdown Links from many different apps, including the Finder (to files).

This automated method of generating Markdown Links is a huge time-saver particularly useful when using text editors.

I created Create Rich Link from Markdown Link to leverage the power of Copy as Markdown Link. It is intended for macOS apps that support rich text (e.g., Notes, Pages, Word — indentified in the macro by checking the availability of Cmd+K). It converts a Markdown Link (in the Clipboard) and creates a “clickable” Rich Link in such rich text applications.

This macro reads the System Clipboard and, if a Markdown Link is detected, it creates a Rich Link by automating these steps:

  1. Paste the Text from the Markdown Link
  2. Press Cmd+K
  3. Paste the URL from the Markdown Link
  4. Press Return

Here's and example of how I use Copy as Markdown Link and Create Rich Link from Markdown Link together:

  1. In the Finder, select a file.
  2. Use the Hot Key Trigger to run Copy as Markdown Link.
  3. Open the Notes app and select a new or existing note.
  4. Use the Hot Key Trigger to run Create Rich Link from Markdown Link.

I’m sure that the Keyboard Maestro experts out there can suggest improvements (and, please do), but even as is, I find this macro very useful. Maybe some of you will also benefit.

Create Rich Link from Markdown Link.kmmacros (22.7 KB)

2 Likes

FWIW the Copy as Markdown Link macro has now been updated to automatically place a Rich Text link in the clipboard, in addition to the Markdown link.

  • Pasting into a rich text editor will now yield a labelled RTF link
  • Pasting into a plain text editor will still yield an MD link
1 Like

That's a great enhancement. Thanks!