8 Replies
Chris Duerden
Zsolt Olah

In my advanced Storyline session at the ATD TechKnowledge conference people asked me if there's a way to copy text from a variable to the clipboard programmatically, so the user can paste it somewhere. 

Yes, try this (using JavaScript):



Thanks got this Zsolt - just built an troubleshooter that sits in an iframe pop-up within one of our tools, and this JS copies some text across to an email which can then be sent straight to our IT dept when things go wrong. Super useful!


Last piece of the jigsaw. When the text is copied, in the top left of the browser it shows a text box with the copied text. I believe this is because the JS creates the textboc then copies its contents. So how can I get the textbox to delete after this has taken place?

Thanks for any help!

Yu Ying Lin

Hello! Thank you for this function. I am planning to use it for my e-learning project. There's one question: if I want to have several lines in the text, how can I do that?

For example, there's a code I want my learners to copy like the following:


cd git-fundamental-repo01

echo "hello world" > file1.txt

cat file1.txt


How can I make it happen in just one click?



Amallie Alegre

Hi Zsolt thank you so much for sharing this! I was hoping to ask if you have a way as well to paste text to a text entry with a live word count. Currently, I only configure my word count if the user starts typing. However when a text is copied and pasted in the text entry-- it does not recognize the word count anymore. Appreciate your help on this. Attached for your reference.