How to fetch content on onpaste events in LWC?
When I am trying to fetch the data on onpaste event. checkPasteLength gets invoked when I try to paste some text but event.key returns undefined and event.clipboardData.getData('textarea') returns null
checkPasteLength(event){ console.log(event.key); console.log(event.clipboardData.getData('textarea')); }
Is there a way to get the value on onpaste
This wilk works fine for fetch content on onpaste.
checkPasteLength(e){ var clipboardData = e.clipboardData || window.clipboardData; console.log(clipboardData.getData('Text')); }