Edit This Code:
See Result »
<
!DOCTYPE
html
>
<
html
>
<
body
>
<
p
contenteditable
="true"
onpaste
="myFunction()"
>
Try to paste something inside this paragraph.
<
/p
>
<
script
>
function
myFunction() {
alert(
"You pasted text!"
);
}
<
/script
>
<
/body
>
<
/html
>
<!DOCTYPE html> <html> <body> <p contenteditable="true" onpaste="myFunction()">Try to paste something inside this paragraph.</p> <script> function myFunction() { alert("You pasted text!"); } </script> </body> </html>
Result:
Privacy Policy