const html = <p><strong>fgkjhgh</strong></p> <p><em>fgfghfgh</em></p> <p>gfbfg</p> <p>ghfgh fgf</p>" let plainText = html.replace(/<[^>]*>/g, ""); console.log(plainText) // plainText= "fgkjhgh fgfghfgh gfbfg ghfgh fgf"