how to convert plain text to html in javascript code example Example: javascript html string to plain text myString.replace(/<[^>]*>?/gm, '');