JSFiddle - React, Tailwind, and code Playground
by mikkelbreum
HTML
<textarea class="automarkup" rows="4" cols="50">Some text</textarea>
JavaScript
$('textarea.automarkup').focus(function() {
$this = $(this);
$this.select();
window.setTimeout(function() {
$this.select();
}, 1);
// Work around WebKit's little problem
$this.mouseup(function() {
// Prevent further mouseup intervention
return false;
});
});