jQuery bind to Paste Event, how to get the content of the paste
I have a jquery token tagit plugin and I want to bind to the paste event to add items correctly. I'm able to bind to the paste event like so: .bind("paste", paste_input) ... function paste_input(e) { console.log(e) return false; } How can I obtain the actual pasted content value? jeff There is an onpaste event that works in modern day browsers. You can access the pasted data using the getData function on the clipboardData object. $("#textareaid").bind("paste", function(e){ // access the clipboard using the api var pastedData = e.originalEvent.clipboardData.getData('text'); alert(pastedData); }