Answers for "how to strip html in js"

1

strip html tags javascript

originalString.replaceAll(/(<([^>]+)>)/gi, "")
Posted by: Guest on April-15-2021
1

how to strip html tags in javascript

function stripHtml(html)
{
   let tmp = document.createElement("DIV");
   tmp.innerHTML = html;
   return tmp.textContent || tmp.innerText || "";
}
Posted by: Guest on March-01-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language