Forum Discussion
BrettSchlagel-e
10 years agoCommunity Member
Copy Text Variable to Clipboard
I need some help.
I need users to be able to click a button to copy a text variable to their clipboard, which can then be pasted in a word doc. This doesn't necessarily have to be done through a ...
JacksonHamner
10 years agoCommunity Member
Could you give an example of what you mean? The code is maintaining the spaces/ new lines for me.
If you need to convert the \n into </br> then switch
var text= player.GetVar("copytext");
to
var text= player.GetVar("copytext").replace(/(\r\n|\r|\n)/g, '<br />');