Mysterious Trouble Pasting Rich Text

I've got a named clipboard with fomatted text and images. I have a macro that pastes that clipboard into I built the macro using some tricks from this thread. In the past it would paste rich text, but today it's pasting plain text. :confused:

When I look at the text in Preferences > Clipboard I see my images and formatted text.

Things I've tried:

  1. If I select all the text in Preferences > Clipboard, copy, and paste into or the formatting and images disappear.
  2. If I copy the named clipboard to the system clipboard and paste into or the formatting and images disappear.
  3. If I drag the icon next to the named named clipboard to the system clipboard into or the formatting and images are there.

Hey Steve,

  • Quit the Keyboard Maestro Engine.
  • Quit and restart the Keyboard Maestro Editor.

If that doesn't help.

  • Reboot.

If that doesn't work then please report back and include:

  • macOS version.
  • Keyboard Maestro version.


Thanks. I tried that and it worked a few times, but then I lost the rich text. I kept going and just tried it again. What I found is that it would happen intermittently. Every 2nd-4th time. The lack of rich text might repeat a few times, then I could paste rich text again. I couldn't find a pattern to make sense of it.

I'm using Version 9.2 of Keyboard Maestro
macOS version 11.6

Let me know what you think.


Okay. Make the smallest possible test-case macro that demonstrates your issue and post it.

If we can repeat the problem Peter should be able to fix it.


Ok, will do. I'm on a deadline for another project so it may be a bit. Thanks!

1 Like

Sorry, this may remain a mystery.

I happened to update to MacOs 12 Monterey and haven't seen the issue in a while. :man_shrugging:

If it comes up again, I'll let you know!

1 Like

Ok, I noticed this happening again.

I'm using

  • macOS 12.3.1
  • Keyboad Maestro Version 10.0.2

I'm also using Launchbar, which may be impacting the clipboard?

Will try to create a test macro to reproduce.

Ok, I'm still seeing this, still seemingly intermittently. I was trying to narrow down the possibilities - turning off things like launchbar, etc.

I kept the clipboard history switcher window open and noticed this.

If I deleted the plain text version at the top, it would re-appear.

Now I can't get it to repeat. What shows up in the clipboard history is plain text, every time. No matter where I copy from, that i know has rich text, it shows up as plain text. I do have earlier entries that will, sometimes, show up as rich text that were part of the script I've been working on.

Images copy fine.


I once worked in Q.A. but I am not sure how to track this down or what to try! Any ideas are welcome.

Two things to check, bearing in mind that:

  1. The clipboard generally contains, at any given moment, several different pboarditems, each representing the current data in a different format, and each with its own identifying label.
  2. the choice of which of these pboarditems to use, when a paste is requested, is up to the receiving application – in this case

First thing to check, is Mail in plain text or rich text mode, when this happens ?

Second, what set of pboarditems is actually in the clipboard when this happens ?

(There’s a Clipboard Viewer macro on this forum, which shows the bundle ids of the pboarditems currently in the general pasteboard)

1 Like

Thanks for this.

Yes. I made sure the settings were to open new emails in rich text mode. But then I started going back to see what was being copied. I've noticed this in other applications too so I think it's being copied as plain text.

Great question and I think this is narrowing it down.

I made a quick macro using your Clipboard View (well done by the way). Mine simply activates text edit where I have some rich text, copies what's selected, then runs your macro.

The result is:

  "public.utf8-plain-text as string": "This is rich text.",
  "public.utf8-plain-text as data": "This is rich text."

So it seems to be only copying in plain text right?

If so, I'm wondering what setting I may have set or program I may be running that would do this? It's happening on my laptop and desktop (though I did copy over a lot of settings).


Silly question -- but do you have the same problem if you've quit the Keyboard Maestro Engine before copy/pasting?

I'd noticed there's a "Remove Styles" macro, and wondered if maybe you'd unwittingly enabled something similar that was activated by the "Clipboard Changed" trigger.

Yes, you've only got a public.utf8-plain-text pboardItem in the clipboard there.

I did turn off the engine again just to double check and gave it a shot. Same result.

I hadn't thought about that "Remove Styles" macro and disabled that one and a "Remove Formatting" one just to be sure. But still not able to copy rich text.

Thanks for the validation! :slightly_smiling_face:

So if I'm quitting the engine and it's still happening, does that rule out Keyboard Maestro as the source of the problem?

Remind me where you are copying from ?

It might be worth checking the clipboard contents at an earlier stage, if there is one.

For the sake of troubleshooting, at this point I'm just creating a rich text document in text edit. Then I highlight a line and copying it with ⌘-c.


and at that stage, just after copying, what does the clipboard viewer macro reveal in the clipboard ?

If there's just plain text in the clipboard after a TextEdit ⌘C,
then has ⌘C been reassigned, as a hotkey, from the application's default Edit > Copy to some kind of KM macro ?

i.e. perhaps mysterious trouble in copying rich text.

Here, for example, after selecting and copying this selection from TextEdit:

Screenshot 2022-06-22 at 08.04.35

I have both public.rtf and public.utf8-plain-text pboardItems in the clipboard:

  "public.rtf as string": "{\\rtf1\\ansi\\ansicpg1252\\cocoartf2580\n\\cocoatextscaling0\\cocoaplatform0{\\fonttbl\\f0\\fswiss\\fcharset0 Helvetica;\\f1\\fswiss\\fcharset0 Helvetica-Bold;}\n{\\colortbl;\\red255\\green255\\blue255;}\n{\\*\\expandedcolortbl;;}\n\\pard\\tx720\\tx1440\\tx2160\\tx2880\\tx3600\\tx4320\\tx5040\\tx5760\\tx6480\\tx7200\\tx7920\\tx8640\\pardirnatural\\partightenfactor0\n\n\\f0\\fs24 \\cf0 alpha \n\\f1\\b beta \n\\f0\\b0 gamma}",
  "public.utf8-plain-text as string": "alpha beta gamma"

Maybe? But wouldn't that end once I quit the Keyboard Maestro engine?

I also thought it might be some other program - but what could override ⌘C across everything?

:thinking: Wait a second...

AH HA! :person_facepalming:

I just went through all my keyboard shortcuts in system preferences, checked every service. Then I checked applications looking for something that would be constantly running and overriding ⌘C.

Then I saw TrackerZapper

I heard about TrackerZapper way back when and thought "why not". I have had it running since. But suddenly it was suspect!

I turned it off – I could copy rich text! :raised_hands: I updated TrackerZapper – just to see – and I could copy rich text! So I had an old version of TrackerZapper running and just forgot about it. Ugh.

However, @ComplexPoint and others, your help was not in vain! I only really noticed this show up when I was running these macros. By being able to eliminate Keyboard Maestro I was able to narrow it down. (Still not sure why it was intermittent, but I'm ok not knowing now that it's solved.)

My point is: THANK YOU ALL!