Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript detect paste contents

document.addEventListener("paste", function(e) {
	let pasted = e.clipboardData.getData('text/html');//with full HTML
  //let pasted = e.clipboardData.getData('text/plain');//text only
     alert(pasted);
});
 
PREVIOUS NEXT
Tagged: #javascript #detect #paste #contents
ADD COMMENT
Topic
Name
6+5 =