tsunami

log in
history

AutoHotkey: alter clipboard HTML

Luke Breuer
2016-11-18 18:04 UTC

description
Copies the selected text, which is expected to be HTML (e.g. from an Evernote), and adds red underlining via the HTML border-bottom attribute.
AutoHotkey
#v::
Send ^c
RunWait, "C:\Users\labreuer\Documents\Visual Studio 2013\Projects\HtmlClipboard\bin\Debug\HtmlClipboard.exe" u
Send ^v
Return
supporting program
HtmlClipboard.exe is a C# program I wrote to alter the HTML on the system clipboard. I've also written a Python script to do this on OS X. I can clean up and release the code of one or both of the above upon request.

The u argument turns text like this:
a <b>test</b>
into:
<span style="border-bottom: 1px solid red">a <b>test</b></span>