Copy to clipboard function?

sovtek 7 years ago updated 7 years ago 4
Is it possible to click a button, and have the contents of a variable stored within the user's clipboard? I have a url that is stored within a variable. I want the ability for a user to click a "Copy Story URL" button, and have the url within the variable copied to their clipboard.

I saw the clipboard attribute for text, but this isn't text that will be written out within the screen.
So you want a user to have the ability to copy the URL and then save it to the native clipboard to be pasted potentially inside of a different app, such as Safari?
Currently the only solution we offer is the clipboard="yes" on a text tag which allows the text to be copied to the native clipboard and then taken outside of the app.

I would be more than happy to submit a feature request for a copy to clipboard from an action rather than a manual process inside of a text object.
That'd be fantastic Ian, thanks