Forum Discussion
Does Storyline allow users to right-click hyperlinks to bring up the browser context menu?
- 6 months ago
You are right that the Storyline player doesn't treat text links like traditional HTML anchor tags as such, so any interactivity you want to have will all need to be managed on the slide as triggers.
If you want to have the web link copied to the user's device clipboard for example you could set up an Execute JavaScript trigger when the element is right-clicked, and use the following JS:
async function copyTextToClipboard(textToCopy) { // Check if Clipboard API is available and the writeText method exists if (!navigator.clipboard || !navigator.clipboard.writeText) { console.error("Clipboard API (writeText) not available."); return false; } try { // Attempt to write the text to the clipboard await navigator.clipboard.writeText(textToCopy); console.log("Copy Successful"); return true; } catch (err) { console.error("Failed to copy text: ", err); return false; } } copyTextToClipboard("ADD THE WEB ADDRESS HERE");
I agree with Chris — it’s definitely easier to get a context menu on an image than on a link, for the reason he mentioned. To make it work with a link in Storyline, you’d need to create a separate anchor (<a>) element and append it in the DOM ancestor above the slide container. Then, you'd style it just like you would in standard HTML. This approach doesn't require an 'Open URL' trigger, but it does involve JavaScript.
That said, it’s not something I’d dive into unless there were only a few links on the slide — otherwise, it can quickly become extra, unnecessary work and a bit of a time sink.
Example:
- PaulGlenn6 months agoCommunity Member
Thanks so much for your reply. Our courses contain far too many to go coding for each one, but I appreciate the additional info!
Related Content
- 5 months ago
- 8 months ago
- 9 months ago