Forum Discussion
ZsoltOlah
6 years agoSuper Hero
How to copy text to the clipboard?
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 somewhe...
ChristinaClark-
7 months agoCommunity Member
Hi Zsolt, thank you for sharing your link. Super helpful.
I have linebreaks in the text to be copied that I want to preserve when it's copied to the clipboard. For example
John Smith
Jane Doe
Peter White
In the input box for the storyline variable, I have no option to include linebreaks and can only render "John Smith Jane Doe Peter White". I've tried adding <br>in the text where I want the linebreak to appear, but that's not working. The copied text also includes the <br> rather than interpreting it as code.
Is there a way to preserve linebreaks in the output text when using your code to copy to clipboard?