At the time of writing this, the Web API: Clipboard.write() is still being implemented and these are some examples for me for future bits of work.
The core piece around this is for text/html
which seems to also need a text/plain
backup on the clipboard.
Check the simple index.html file to see four different examples:
- Copying plain text to the clipboard
- Copying raw HTML as plain and plain text to the clipboard
- Copying plain fallback text and formatted HTML to the clipboard
- A failing copying only formatted HTML to the clipboard
To see live, check out the Github Pages for this repo.