JSFiddle - React, Tailwind, and code Playground

HTML

<textarea id='bar'>This is <b>bold</b> and this is <i>italic</i>.</textarea>

JavaScript

jQuery.fn.stripTags = function() {
        return this.replaceWith( this.text().replace(/<\/?[^>]+>/gi, '') );
};

$("#bar").stripTags();