Retain markdown on Clipboard?

When I copy a task from OmniFocus and paste it into Dynalist, it comes through in markdown with a convenient backlink to the OF task. I like this.

For reasons, I need to use Dynalist in my Firefox browser instead of the app. When I paste into Firefox, only the name of the task comes through; no markdown or back link.

My temp workaround is to paste it into the Dynalist app, cut it out from the app and paste it into Firefox. That works.

I'd like KM to paste the MD and backlink directly into Dynalist in Firefox, without the intermediate step. I've tried having KM type the clipboard instead of pasting, but no markdown came through.

Any suggestions appreciated.

Does it refer here to the Rich Text OmniFocus note attached to the item ?

(as far as I'm aware, the main text of an OmniFocus item is unformattable plain text, so I haven't yet formed a clear picture of the role of the markdown in this process)


OmniFocus puts XML, RTF, and plain text into its clipboard, so retain may not be quite the word – any markdown that you are seeing is presumably being created by Dynalist, probably in translation from the XML, rather than RTF, pasteboard content created by OmniGroup.


To see what's actually in the Dynalist/Firefox clipboard (from which you may need to prune unwanted clipboard flavours to retain only the format you want) you can use a macro like:

Sorry, I'll clarify:

In OmniFocus, I have a task that looks like this:

Make KM macro to paste into DL-firefox

If I Cmd-C copy it and paste it into the Dynalist app, it arrives like this:

[Make KM macro to paste into DL-firefox](omnifocus:///task/o8grZpeJoHw)

...and Dynalist supports the backlink which is very convenient. However, if I paste into Dynalist running on Firefox, it arrives like this:

Make KM macro to paste into DL-firefox

With all the markdown filtered out. As a workaround, if I paste into the Dynalist app, then cut/paste from Dynalist into DL-Firefox, the MD will arrive. It seems like cutting from the Dynalist app puts data on the clipboard in a way that won't be filtered out when pasting into DL-Firefox.

I just wanted to use KM to do this in a single step so I can copy from OmniFocus, paste into DL-Firefox and retain the MD.

As an additional data point, the markdown on the clipboard is also filtered out when pasting into BBEdit, but Obsidian allows the MD through.

Does that help?


A quick check here suggests that the Firefox clipboard, after copying from Dynalist, will contain both a Markdown plain text pasteboard item, and a public.html, pasteboard item.

You should be able to prune out the unwanted public.html pasteboard item, leaving only your preferred public.utf8-plain-text (Dynalist markdown, in this case), with an action like:

Keyboard Maestro Export

See whether pasting after removing the public.html flavour yields the Markdown that you want.


For example, after:

  1. copying from a formatted section of the Dynalist live demo, and
  2. running a Remove Clipboard Flavours action in KM, pruning out the competing public.html

I find that I can paste this:

You can format things in Dynalist too
The basics: **bold** and __italics__
And links! Without title like https://dynalist.io or with title like [Dynalist](https://dynalist.io)
Inserting images? No problem! ![Here's an example](https://dynalist.io/assets/img/paint-brush.png)
Write some code with inline code: `alert("hello world!");`
Write some equations with LaTeX: $$f(x) = \int_{-\infty}^\infty \hat f(\xi)\,e^{2 \pi i \xi x} \,d\xi$$

But if the issue is to paste a markdown link (item name and item url)

  1. Copying from OmniFocus, and
  2. Pasting into Dynalist running in Firefox

Then I would suggest that you copy the OmniFocus item using this script:

the latest version of which (use the green Code button to download) is always at:

RobTrew/copy-as-md-link: macOS Keyboard Maestro macro group – single keystroke to copy MD links from different applications.

Thanks! Copy as Markdown did the trick!

1 Like