Copy text to clipboard by double clicking?

Jan 07, 2013


I am building a troubleshooting decision tree for use in production.This will basically be one big slide with tons of layers.

This will be used when chatting with customers, so one functionality I would like is to have certain objects, which when double-clicked, would copy certain text to the users clipboard.

I thought maybe I could accomplish this with the execute javascript trigger. I looked up java script online and found some for copying text to clipboard. I entered this code in the trigger, but when I published and double-clicked the object, nothing happened.

I don't know much about java script, so I don't know if the problem is with the code or if I'm doing something wrong in Storyline.

Can someone tell me how I can accomplish this? I just want certain text to copy to the users clipboard when they click on certain objects on the screen.

If it helps, here is the code I was trying to use:

function copyToClipboard(text)
    if (window.clipboardData) // Internet Explorer
        window.clipboardData.setData("Text", text);
    { "UniversalXPConnect");  
        const clipboardHelper = Components.classes[";1"].getService(Components.interfaces.nsIClipboardHelper);  

1 Reply

This discussion is closed. You can start a new discussion or contact Articulate Support.