Copy Code to clipboard


#1

Hi guys,

I need to copy a voucher code from a playcanvas app to the memory of the
device by a button to paste it into a mobile website later… is that possible
within playcanvas or do I need an html layer for a functionality like that?

copycode


#2

Yeah, that’s doable. https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard


#3

How would you implement that in playcanvas? Could it work without using an extra html layer, just calling code inside playcanvas?