Forum Discussion
MaryFranchetti
7 months agoCommunity Member
Java script for multiple copy buttons not working
I have multiple slides. On slide one for all the copy buttons I am using the following and just changing the text in between the " " on the copyFunction line, This is working perfectly. However, whe...
Nedim
7 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");
}