Edit This Code:
<!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:
Try it Yourself - © w3schools.com
Privacy Policy