Browser Clipboard Interaction
- Clipboard API:
navigator.clipboard.readText()
,navigator.clipboard.read()
navigator.clipboard.writeText()
,navigator.clipboard.write()
- returns a Promise
- browser compatability
document.execCommand()
(deprecated)let copyText = document.querySelector("#input"); copyText.select(); document.execCommand("copy");
- also available:
paste
,cut
(list)
- also available: