Skip to main content
16-Pearl
Apr 25, 2023 3:36 PM UTC
Question

copy functionality in selecting the data in tree grid.

how to implement copy functionality in selecting the data in tree grid 

 

3 replies

17-Peridot
Apr 25, 2023 9:01 PM UTC

You mean a copy to clipboard functionality? If so there, is no such functionality yet: https://community.ptc.com/t5/ThingWorx-Ideas/New-widget-to-be-able-to-copy-data-to-the-clipboard/idi-p/616955

Translate
16-Pearl
Apr 25, 2023 10:13 PM UTC

Okay Thanks

Translate
17-Peridot
Apr 26, 2023 9:19 PM UTC

As I was interested I did adapt an existing widget-extension we have with CopyToClipboard. It just uses 'navigator.clipboard.writeText(copyText.value);' like described in https://www.w3schools.com/howto/howto_js_copy_clipboard.asp

 

nmutter_1-1682544693178.png

It is not "offical" yet, still in my fork. But if you want to give it a try: https://github.com/Death111/CopyToClipboardWidgetTWX  in Actions tab you can select the latest pipeline (current) run to download the extension (need to be logged in in github).

It did work fine in my test instance and Chrome. What I've read about the navigator.clipboad function is that it only works on https sites or localhost

Translate