How can I copy to clipboard in Reactive Application?

Hello. I have a text and I want to copy to clipboard this text. I tried to add my application any component from forge. But anything cannot support reactive application. Also I tried to use javascript code. But it cannot work too. Can anyone help me? Thank you.

Hi Yusuf,

I'm not sure if there are any particularities specific to Reactive Web apps, it should be a simple matter of using the right JavaScript in the right place... according to the specification of the Clipboard feature by W3C you can only use it in some circumstances (for security reasons)

You can check here, here and here for examples on how to do it in various ways.

Hope this helps

Hi Yusuf,

var element  = document.getElementById($parameters.InputWidgetID);


element.setSelectionRange(0, 99999);


Use the above code, pass the widget ID to the script. You can able to copy only  from input box or text area. You can't copy the characters from a container or expression.


Tag this as a solution:)

Nice! :)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.