JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<input id='txt' type='text' />
</div>
JavaScript
$('#txt').on('paste', function(e) {
var copied = "";
if (isIE()) {
copied = window.clipboardData.getData('text');
} else {
copied = e.originalEvent.clipboardData.getData('text/plain');
}
alert(copied);
});
function isIE() {
var ua = window.navigator.userAgent;
return ua.indexOf('MSIE ') > 0 || ua.indexOf('Trident/') > 0 || ua.indexOf('Edge/') > 0
}