I am trying 2 alternatives:
This is my code:>
You can control what text is put into the clipboard:
document.addEventListener('copy', function(e) {
e.clipboardData.setData('text/plain', 'Please do not copy text');
e.clipboardData.setData('text/html', 'Please do not copy text');
e.preventDefault();
});
https://developer.mozilla.org/en-US/docs/Web/Events/copy