How can i copy a text from a JavaScript variable directly to clipboard (without use an html text area)?
I'm already tried this:
function fxCopyToClipboard() {
var varText = "TEXT FOR PASTE";
varText.select();
varText.execCommand("copy");
}
<button type="button" onclick="fxCopyToClipboard();">To Clipboard</button>