Not sure about the "Display as HTML" bit, but activating a Named Clipboard in KM's Settings... window takes a bit of a hack...
As far as I know (and I hope someone corrects me!) there is no easily available list of Named Clipboards. And the Clipboard Filter Trigger returns the Named Clipboard's UUID, not a name.
Named Clipboards appear to be stored in ~/Library/Application Support/Keyboard Maestro/Keyboard Maestro Clipboards.kmchunked
. It's a binary file but, luckily, strings
can extract some useful info -- including line-pairs where a Clipboard name is followed by the UUID, albeit with some extra junk in there:
`mdLink2u
$DFCE8C45-2347-4DE1-988E-B2682FFE34BC3u
--
Fubar test2u
$05B57846-CBBD-4A04-B6D6-8D099CD440133u
The 2u
at the end of the name, the at the beginning of the UUID and the
3u` at the end are consistent and can be cleaned up, but some names have one (and maybe more) characters prefixed -- the actual names of the above are "mdLink" and "Fubar test" -- and my best solution to that is to keep trying, chopping of the first character on every failure, until there's a name match...
Enough moaning! Here are "Pick from list" and "Clipboard Filter" macros that open your choice, ready for editing:
Note: These macros require the strings
utility, part of "Xcode Command Line Tools". You can get that by:
- Running the
strings
command in Terminal -- that should start the download and installation process - Install the package from the command line: Use xcode-select to Install Xcode Command Line Tools ¡ Mac Install Guide
- Install with Homebrew: Xcode Command Line Tools with Homebrew ¡ Mac Install Guide
Apologies to @Ronald for forgetting these aren't included in the vanilla OS install.
Edit Named Clipboard (List).kmmacros (4.6 KB)
Edit Named Clipboard (Contextual).kmmacros (4.2 KB)
They work for me, though I'll confess they haven't been tested extensively. They'll break if you have two Clipboards with the same name. And there will be problems if you use emojis, and maybe accented characters, in your Clipboard names -- I think strings
outputs a space for each of those, which might be OK if it's the first character but probably not if it is later in the string...
You might, for example, be able to Paste the Named Clipboard into Text Edit and make your changes there before Copying back to the Named Clipboard. I don't know, I don't use Named Clipboards much and certainly don't edit their contents!