xxxxxxxxxx
originalString.replaceAll(/(<([^>]+)>)/gi, "")
xxxxxxxxxx
let unStripped= "<h1 class= 'header_tag'>Strip <i>Tags</i></h1>";
let replace= unStripped.replaceAll(/<\/?[^>]+(>|$)/gi, "");
console.log("Stripped html tags:", replace);
xxxxxxxxxx
function stripHtml(html)
{
let tmp = document.createElement("DIV");
tmp.innerHTML = html;
return tmp.textContent || tmp.innerText || "";
}