JSFiddle - React, Tailwind, and code Playground
by Michael Over
HTML
<textarea><span style="color: blue">Test</span></textarea><br />
Show textarea here: <span id="show"></span>
JavaScript
jQuery.fn.stripTags = function() { return this.replaceWith( this.html().replace(/<\/?[^>]+>/gi, '') ); };
$inner = $("textarea").val();
$("#show").text($inner);
$('textarea').val($inner.replace(/(<([^>]+)>)/ig,""));