JSFiddle - React, Tailwind, and code Playground
by Joe Pool
HTML
<body>
<div>The text below has a tab between the <em>a</em> and the <em>b</em>:</div>
<pre>a b</pre>
<div>Modify the regular expression in the javascript to replace the tab with a single space whenever you paste it into the text box below.</div>
<div><input type="text"></div>
<div><a href="#">x</a></div>
</body>
JavaScript
$(document).ready(function() {
localStorage.setItem("titlebulkedit", document.title);
$('input').bind('paste', function() {
setTimeout(function() {
var obj = ('input').val();
var text = obj.replace(/\W+/g, ' ');
$('input').val(text);
});
});
});