Is there a reliable way to access the client machine's clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use Flash?
My primary target is IE8, but would like to support FF and Chrome also.
I have seen the technique to do this using Flash, but am looking for a pure js route:
Clipboard access using Flash
Accessing the OS clipboard using browser JavaScript has been possible for several years using document. execCommand() .
Clipboard Permission Manager is a browser extension which allows users to grant JavaScript access to the clipboard on a per-page basis. It should work with any page that uses the W3C Clipboard API.
Since this is a big security risk, all browsers that care about safety don't allow JS to access the clipboard.
The main reason is that many people put their passwords into a text file and then use cut&paste to login. Crackers could then collect the password (and possibly other private information like the word document which you just copied) from the clipboard by cracking a popular site and installing some JS that sends them the content of the clipboard.
Which is why I have flash disabled all the time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With