layerssss / paste.js

read image/text data from clipboard (cross-browser)
http://layerssss.github.io/paste.js/
MIT License
463 stars 94 forks source link

How can I trigger "pasteImage" on button click? #50

Closed mb13 closed 7 years ago

mb13 commented 7 years ago

The CTRL-V functionality in textarea is working for me for images. But I would like to add a new button that would do the same job: it means if user clicks on it, it would take the content of the clipboard and would send me the required data. Is it possible to do that?

layerssss commented 7 years ago

Hi @mb13 , I don't think it's possible. Because the web content shouldn't be able to get OS clipboard content without explicit user instruction (CTRL/CMD - V). Otherwise it would be a security / privacy concern.