I am working on an online typing software. In the typing software, all is going well but I have the problem of dishonest users who might possibly type the text into the text
Bind the event handlers and prevent the clipboard function like such:
$('textarea').on('copy paste cut drag drop', function (e) {
e.preventDefault();
});
You can try to use the following jQuery code:
$('input[type=text],textarea').bind('copy paste cut drag drop', function (e) {
e.preventDefault();
});
You maybe could do something like:
var txtArea = document.getElementById("YourTextAreaId");
txtArea.oncopy = function() { return false; }
txtArea.onpaste = function() { return false; }
txtArea.oncut = function() { return false; }
But even then, the user can copy the content by other means, as suggested in your question.
You can block some events, but preventing such user behaviour is not possible. User can always copy text from DOM node via browser console.