You cannot just insert displayed text. You must create an input area where they can embed, <input> or <textarea> or similar. It inherits the onpaste handler, so you do not need to install it directly on the input element, but it does not work outside of one in most browsers.
See the fiddle here: http://jsfiddle.net/Lznvm8x9/
I am on a Mac, so I can not test IE, but it works in Firefox, as well as in Safari and Opera.
If you want to detect control-V as a key chord independent of the actual paste function, you can use keydown / keyup , but then you get into cross-platform problems - do you still want to be control-V on a Mac, where paste usually is the -V command, etc.
Mark reed
source share