"Copy to clipboard" button

Sometimes I am forced to use some javascript, but I am far from a javascript expert. In general it is possible to use a javascript function in Anvil by, first, incuding the javascript function itself in the HTML or under Assets and, second, calling this function from Python using call_js().

A quick google search indicates that it is possible to use javascript to get the content of the clipboard: https://stackoverflow.com/questions/50633601/is-it-possible-to-paste-from-clipboard-onclick-in-javascript. Except for that, I am afraid I do not know enough to give you a good solution right away, unfortunately.

1 Like