Copying rich text using the Clipboard API

Documenting a rabbit hole I recently went down.