0

Is it possible to get the contenst of the CLipboard with JS, Jquery or PHP ?

I have seeen clipboard.js - https://clipboardjs.com/, but this only sets it not getting it back

For example, I want to open a webpage and with whatever library, access the clipboard, and then do something with it.

Maybe a workaround is to trigger the CTRL + V command and send that to a hidden textbox - not sure on how to do though.

ANy ideas ??

Cheers

Keshan Nageswaran
  • 7,547
  • 3
  • 24
  • 41
James_Inger
  • 83
  • 2
  • 10
  • 2
    Possible duplicate of [Get current clipboard content?](http://stackoverflow.com/questions/6413036/get-current-clipboard-content) – Obsidian Age May 18 '17 at 04:13
  • Also see http://stackoverflow.com/questions/2176861/javascript-get-clipboard-data-on-paste-event-cross-browser. – Obsidian Age May 18 '17 at 04:14

1 Answers1

0

I personally don't believe you'll be able to achieve this, well I mean one potential way (purely theoretical & untested) capture CTRL key keydown events and set focus to a text input or text area that's hidden (if possible?) and then check if the CTRL key was used with V then you'd use what's in the text area or input.

brandito
  • 646
  • 7
  • 19