Скопировать строку JS
newString = `${oldString}`;
Jolly Jay
newString = `${oldString}`;
const el = document.createElement('textarea');
el.value = str; //str is your string to copy
document.body.appendChild(el);
el.select();
document.execCommand('copy'); // Copy command
document.body.removeChild(el);
navigator.clipboard.writeText("your text here")
var dummyContent = "this is to be copied to clipboard";
var dummy = $('<input>').val(dummyContent).appendTo('body').select()
document.execCommand('copy')