Forum Discussion
NedimRamic-88da
5 months agoCommunity Member
This is how I'd do it:
var text = getVar("HelpMessage");
copyFunction (text);
function copyFunction(tt) {
const copyText = tt;
const textArea = document.createElement('textarea');
textArea.textContent = copyText;
document.body.append(textArea);
textArea.select();
document.execCommand("copy");
}