Can someone show me the Javascript function to copy anything?

I've been wanting to make a block that copies anything that I put in, like untitled script pic (7)

(here's the link)

Bonus: image


You're welcome!

never mind, I was using the wrong CALL block

It looks cool, but I am to dumb to write it on my own. Could you please share the js function as text, so I can use copy/paste?

oh, I made a project with it. here it is

I think it would be really useful to have it as a primitive, too, because many times I wanted to copy a value of a calculation but I couldn't. Can you make it a primitive, @jens , please?

you can't send blocks to the clipboard, it only sends the xml to the clipboard, and if you want to send lists to the clipboard, you have to join the list, otherwise it says, "a list [...] elements" (I didn't check, but it says something like that)

This only works in some browsers, but is a great idea!

I am in favor of a general "Copy Result" menu option on reporters and watchers.

that would be great