16
Views
3
Comments
Solved
[Copy To Clipboard Traditional Web] Demo is not working
Question
Forge component by OutGirls Lab .
0
Published on 12 Apr 2020

I tried the demo by click copy then paste into Notepad and found nothing has been copied to the clipboard.

mvp_badge
MVP
Rank: #91
Solution

Hi Ruttanachai Auitragool,

I'm not aware about this component but I do have a solution for your requirment.

See this sample app 

Please find the attached .oml file

JavaScript Code Snippet

"var textToCopy = document.getElementById('" + Input_UserInput.Id +"').value;
navigator.clipboard.writeText(textToCopy)
  .then(() => { alert(`Copied!`) })
  .catch((error) => { alert(`Copy failed! ${error}`) })
"


Hope this helps you!


Regards,

Benjith Sam

ClipboardDemoTraditionalWeb.oml