I have this code for paste:
navigator.clipboard.readText().then(
clipText => document.querySelector("#Note").innerText += clipText);
But It has this error:
Uncaught TypeError: navigator.clipboard.readText is not a function
help me to solve this bug
I'm guessing you are testing it in Firefox, in that case:
Firefox only supports reading the clipboard in browser extensions, using the "clipboardRead" extension permission.
https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/readText#browser_compatibility
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