# Can a custom module read and write to the clipboard of a Perspective client?

**URL:** <https://forum.inductiveautomation.com/t/can-a-custom-module-read-and-write-to-the-clipboard-of-a-perspective-client/64094>\
**Category:** Module Development\
**Tags:** perspective\
**Created:** [September 15, 2022, 7:00am UTC](https://forum.inductiveautomation.com/t/can-a-custom-module-read-and-write-to-the-clipboard-of-a-perspective-client/64094 "2022-09-15T07:00:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [September 15, 2022, 7:00am UTC](https://forum.inductiveautomation.com/t/can-a-custom-module-read-and-write-to-the-clipboard-of-a-perspective-client/64094/1 "2022-09-15T07:00:43Z")

</div>

I found this answer on stackexchange about reading from the clipboard via a javascript API (at least I think it’s javascript…?)

> <https://stackoverflow.com/questions/6413036/get-current-clipboard-content>

> **[Clipboard API - Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API)**
>
> The Clipboard API provides the ability to respond to clipboard commands (cut, copy, and paste) as well as to asynchronously read from and write to the system clipboard.

Possible to bring this into Ignition via a module? I’d like to use the clipboard for some dev tools, as writing 100k+ rows of text into a Perspective text area is… not great… (or rather, it doesn’t; it crashes the browser)

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [September 15, 2022, 10:32am UTC](https://forum.inductiveautomation.com/t/can-a-custom-module-read-and-write-to-the-clipboard-of-a-perspective-client/64094/2 "2022-09-15T10:32:04Z")

</div>

It is indeed javascript,

It only works on some browsers and on some specific inputs. it also requires a prompt to be accepted.  
Not really great for anything tbh, what are you trying to do?

You should proabbly use a file upload for such things

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [September 15, 2022, 10:38am UTC](https://forum.inductiveautomation.com/t/can-a-custom-module-read-and-write-to-the-clipboard-of-a-perspective-client/64094/3 "2022-09-15T10:38:45Z")

</div>

I’ve got some scripts that use tag browse to return tags and their info and to write back to tag properties. It’s fine using text field for \<600ish tags, but any more and it dies. I can always run in script console instead, but would be super useful in a client where I can provide a gui for it. Reason to. Use clipboard as I’m lazy and don’t like saving to files and selecting them 😅

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [September 15, 2022, 10:40am UTC](https://forum.inductiveautomation.com/t/can-a-custom-module-read-and-write-to-the-clipboard-of-a-perspective-client/64094/4 "2022-09-15T10:40:10Z")

</div>

> [@nminchin](#):
>
> I’m lazy

Creating a module just for this seems a lot more work 😛

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [September 15, 2022, 10:40am UTC](https://forum.inductiveautomation.com/t/can-a-custom-module-read-and-write-to-the-clipboard-of-a-perspective-client/64094/5 "2022-09-15T10:40:58Z")

</div>

I’m lazy for boring things, creating a module would be a good intro haha

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [September 15, 2022, 10:43am UTC](https://forum.inductiveautomation.com/t/can-a-custom-module-read-and-write-to-the-clipboard-of-a-perspective-client/64094/6 "2022-09-15T10:43:53Z")

</div>

Heh well, if perspective fails in a textarea i doubt the module would be different xd but the javascript part wouldnt be difficult.

You are just better off uploading files

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [September 15, 2022, 2:08pm UTC](https://forum.inductiveautomation.com/t/can-a-custom-module-read-and-write-to-the-clipboard-of-a-perspective-client/64094/7 "2022-09-15T14:08:24Z")

</div>

The programmers creed “Never spend 6 minutes doing something by hand when you can spend 6 hours failing to automate it”

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [September 15, 2022, 2:17pm UTC](https://forum.inductiveautomation.com/t/can-a-custom-module-read-and-write-to-the-clipboard-of-a-perspective-client/64094/8 "2022-09-15T14:17:18Z")

</div>

Only 6 hrs? 😆

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [September 15, 2022, 2:19pm UTC](https://forum.inductiveautomation.com/t/can-a-custom-module-read-and-write-to-the-clipboard-of-a-perspective-client/64094/9 "2022-09-15T14:19:12Z")

</div>

I think 6 hours is the point where you give up and just end up doing it by hand anyways lol
