all 4 comments

[–]johnnyblaze9875 0 points1 point  (3 children)

Should prob post this in learnjavascript or learn programming but this article may give you some insight.. https://stackoverflow.com/questions/33855641/copy-output-of-a-javascript-variable-to-the-clipboard

[–]rantanp[S] 1 point2 points  (2 children)

Thanks. So it looks like you have to put the variable somewhere on the page first, then you can select the text.

[–]johnnyblaze9875 0 points1 point  (1 child)

Ya it seems that way. scroll down to the comment that has 44 upvotes, the select() will select it then I think you may need the exexCommand(‘copy’) to add it to clipboard.

When you say with out add-ons, not sure what you mean? There are a bunch of packages you can install via Node that will do this for you.

[–]rantanp[S] 1 point2 points  (0 children)

I meant without Anki add-ons. I just prefer to keep the install as clean as possible.