3 ms·
The actual way to control what is copy/pasted is to use the `oncopy` and `onpaste` events and using the clipboard API[0]. This obviously relies on the browser p
by masklinn 13y ago
The actual way to control what is copy/pasted is to use the `oncopy` and `onpaste` events and using the clipboard API[0]. This obviously relies on the browser providing sufficient clipboard access, but that's getting there[1]
Bonus: you can get (on paste) and set (on cut and copy) data in multiple file formats. And obviously you can pre-process pasted data before injecting it in the system.
[0] http://www.w3.org/TR/clipboard-apis/ http://www.w3.org/TR/clipboard-apis/
[1] http://caniuse.com/clipboard http://caniuse.com/clipboard