- copy & paste anything from the browser or console
- allows tabs, soft returns and trailing spaces
- due to the above, recommend
.trim()
on the content
- due to the above, recommend
document.execCommand()
is outdated but so far more reliable since it does not require document focus- requires creating and destroying a
textarea
element
const copy = content => {