I'm searching for a way to paste the image from client clipboard as a div background or canvas. All the ways lead me to ZeroClipboard, but in instructions I didn't find anything about getting content from clipboard, not copying to it. How can I paste the image?

有帮助吗?

解决方案

Because ZeroClipboard is flashed based, it's bound to the limitations that Adobe has set forth:

Note: Content running in Flash Player or in a non-application sandbox in AIR can call the getData() method only in an event handler for a paste event. In other words, only code running in the AIR application sandbox can call the getData() method outside of a paste event handler.

Therefore, no, you cannot get the contents of the clipboard outside of a paste event.

Link to the full article

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top