Copy to clipboard JavaScript action

0
I have a javascript code to copy a value to clipboard. But when I paste that copied value to notepad or any text editor then previous copied value get pasted instead I want to paste current copied value.  When I paste the copied value twice in notepad, so first time the previously copied value gets pasted and second time current value gets pasted. I debugged the microflow and javascript action too, I am getting correct input value in it i.e the current copied value.    export async function JS_CopyToClipboard(inputValue) {  var tempInput = document.createElement("input");    tempInput.value = inputValue;    document.body.appendChild(tempInput);    tempInput.select();    document.execCommand("copy");    document.body.removeChild(tempInput);   }     Can someone let me know what can be the issue ?
asked
1 answers
0

Hi Neha,

Please try this i hope this will work fine.

 

https://marketplace.mendix.com/link/component/119337/CLEVR/Copy-To-Clipboard

answered