How can I send html to the clipboard as rich text from a script? My end goal is create a script so I can paste content from a source file into an email, but I want a general answer for pasting into any program that accepts rich text.
Example usage for pasting into email:
- Open the source file in vim
:TOhtmlcommand to create an html file with vim's syntax highlighting
- Use an answer from here to copy the html as rich text
- Paste into an email (this one wouldn't be scripted)
Related: Pasting diff output into Microsoft Outlook with syntax highlighting