I am using Electron and I'm trying to disable the ability for users to paste into editable content. I'm also keeping paste and match style enabled. This works great on Mac, but for some reason on Windows, normal paste is still possible even when there is no key accelerator that points to a paste function. How can I disable this?
Return false for the input's onpaste function.
For example:
document.querySelector('.noPaste').onpaste = () => false;
You can paste into this one:
<input>
<br/>
You can't paste into this one:
<input class="noPaste">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With