I was looking to copy the image as the reason for it is for the client to copy the image so it can be printed off / sent to printing departments so it can be printed to magnetic stickers etc.
Thanks for the Codepen, that’s exactly what I’m after and I’ll implement it, it would be great if Wappler could do this natively though.
I believe the old Copy to clipboard you are referring to was using execCommand('copy') and copied the selected item to the clipboard. This method is however deprecated and not longer recommended.
The new Clipboard API is supported by all mayor browsers and allows you to read/write the clipboard async. The API only works for websites served using https and require user permissions. The writeText is supported by all browsers, the write is supported by most but not by Firefox (it is in the latest nightly).
Copying an image also isn’t that simple with the new API, see following article:
Is there a reason why you want to copy the QR code as an image? Why not copy the url or the text content that the QR code actual represents.
Why not a button to download the image instead of copy to clipboard, many programs don’t support pasting image from clipboard and accessing clipboard from the browser requires extra permissions.