Legacy GM clipboard_set_text alternative for HMTL5?

Phoebe Klim

Member
So I'm making a thing:

1594295734075.png

I found out that clipboard functions don't work in HTML5 - surely there is some workaround?
 

chamaeleon

Member
So I'm making a thing:

View attachment 32616

I found out that clipboard functions don't work in HTML5 - surely there is some workaround?
Write a Javascript extension that implements a snippet of code like the one from https://hackernoon.com/copying-text-to-clipboard-with-javascript-df4d4988697f. It is presumably a security concern to put arbitrary content into the clipboard from a website in general, and the browser forces you to use a temporary text area for it. You are experiencing the pain points of HTML5 imposing limits on what you can do out of the box, and GMS has not solved all the problems for you that you may encounter. Luckily Javascript extensions are perhaps the easiest to create since it can just be a single file that requires no compilation outside GMS, etc.
 
Top