I’ve been doing some more digging with reference getting this working.
.on('paste', function (e) {
e.preventDefault();
var contentOnBlur = (e.originalEvent || e).clipboardData.getData('text/plain') || prompt('Paste something..');
contentOnBlur = contentOnBlur.replace(/(<([^>]+)>)/ig,'');
document.execCommand('insertText', false, contentOnBlur);
})
The paste
event works nicely in Chrome although using the above snippet results in not being able to paste anything in to the title when using IE.
Somebody has posted a solution to this exact IE problem on Stack Overflow:
https://stackoverflow.com/questions/2176861/javascript-get-clipboard-data-on-paste-event-cross-browser/6804718#6804718
PHP I can handle but I’m out of my depth with JavaScript. It might make more sense to you ??