Clipboard write

#1

Anyone ever use the clipboard-write node? I've got a debug node hooked up in parallel that says msg.payload = "x", but when I paste from the clipboard it just gives me "payload".

0 Likes

#2

a simple inject seems to work for me... can you share just that part of your flow that fails ?

0 Likes

#3

Hmm. I think I might be off track here. How did you access the clipboard? I realize that this probably isn't going to put anything on the clipboard of the device running the UI. Which is what silly me was hoping for.

0 Likes

#4

good point - i was just trying it all on the one machine so of course it works :slight_smile:

It is based on this library - https://www.npmjs.com/package/copy-paste so I think you are correct - will be the server side clipboard it goes into.

1 Like

#5

I just wanted to be able to copy the notification text, and it looks like it lets me do that, so I'm good. Thanks. Are you the main nr guy?

0 Likes

#6

Are you folks discussing node-red-contrib-clipboard? I haven't tried it before, and I can't make it work. I'm running NR v0.20.0-beta.5 and Node.js v8.15.0, and the browser is Safari on macOS 10.11.6. My flow is

[{"id":"f23d38c3.ea5b","type":"inject","z":"d1d36546.c9449","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":90,"wires":[["f9d764ea.2db1b8"]]},{"id":"f9d764ea.2db1b8","type":"clipboard-read","z":"d1d36546.c9449","name":"","x":390,"y":90,"wires":[["681321c1.855588"]]},{"id":"681321c1.855588","type":"debug","z":"d1d36546.c9449","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":570,"y":90,"wires":[]},{"id":"f1bda44b.21bff8","type":"inject","z":"d1d36546.c9449","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":170,"wires":[["656efb0d.f04504","bacd0528.d8cfc"]]},{"id":"656efb0d.f04504","type":"clipboard-write","z":"d1d36546.c9449","name":"","x":420,"y":170,"wires":[]},{"id":"bacd0528.d8cfc","type":"debug","z":"d1d36546.c9449","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":410,"y":220,"wires":[]}]

The clipboard-read node reports an error

Error: Command failed: xclip -selection clipboard -o
Error: Can't open display: (null)

and the clipboard-write node fails silently. Am I doing something wrong?

0 Likes

#7

Yes we are. I was running NR in chrome on windows, and was thinking that content would go between NR and my windows clipboard. Of course, that isnt the case, so I lost interest. What are you hoping to do?

0 Likes