Copy contents from a multiline text field to apple clipboard (operating system) using copy button

Hello,
Is there a way to copy a code snippet from a multiline text field to the clipboard of the operating system using a copy button?
I have the code samples loading from global variables into my code pane but now I added a copy button to the bottom of the text area and want to copy what is currently displayed for the developer.

Thanks, Steve

Hi!

You can do this by adding some javascript to the copy button. This assumes that your text area is called myTextArea. Change the name in the javascript if yours if different. If your name has a space, put double quotes around it. (Or, just don’t put a space in the name!)

Live sample

File: copy_to_clipboard.rp (48.4 KB)

3 Likes

Thank you so much Joseph, worked like a charm by just modifying the javascript slightly to match my naming convention. Thanks for your help. Take care, Steve

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.