I am trying to implement an icon that when clicked will save a variable to the user\'s clipboard. I have currently tried several libraries and none of them have been able to
Use navigator.clipboard.writeText to copy the content to clipboard
navigator.clipboard.writeText
navigator.clipboard.writeText(content).then().catch(e => console.error(e));