4 ms·
execCommand paste is limited by browsers, so synthetic events don't have the content (see section 8 of http://www.w3.org/TR/clipboard-apis/ http://www.w3.org/TR
by adzicg 11y ago
execCommand paste is limited by browsers, so synthetic events don't have the content (see section 8 of http://www.w3.org/TR/clipboard-apis/ http://www.w3.org/TR/clipboard-apis/). although that would increase the capabilities of web apps so people could nicely integrate custom copy/paste, it seems to be a security risk (eg you can grab the clipboard contents and paste to a hidden input field, then post to server without the user knowing).
you can plug into the paste pipeline and replace the data pasted when a user causes paste, either by clipboard or clicking on the browser menu/context menu though, just using the html5 events. You don't need a separate library for that.