Answers for "tinymce return text and html"

0

tinymce return text and html

const html = <p><strong>fgkjhgh</strong></p>n<p><em>fgfghfgh</em></p>n<p>gfbfg</p>n<p>ghfgh fgf</p>"

let plainText = html.replace(/<[^>]*>/g, "");
 console.log(plainText) // plainText= "fgkjhgh fgfghfgh gfbfg ghfgh fgf"
Posted by: Guest on February-04-2022

Browse Popular Code Answers by Language