Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

strip html tags javascript

originalString.replaceAll(/(<([^>]+)>)/gi, "")
Comment

js strip_tags

let strippedString = originalString.replace(/(<([^>]+)>)/gi, "");
Comment

how to strip html tags in javascript

function stripHtml(html)
{
   let tmp = document.createElement("DIV");
   tmp.innerHTML = html;
   return tmp.textContent || tmp.innerText || "";
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: create-react native app without expo 
Javascript :: square all numbers in array javascript 
Javascript :: javascript sort in array of objects 
Javascript :: add event listener on modal close 
Javascript :: how to validate file extension in javascript 
Javascript :: how to run angular 
Javascript :: react router external link 
Javascript :: sequelize generate migration 
Javascript :: js dom get website name 
Javascript :: let count = 0;console.log(parseInt("count"+ 1)); 
Javascript :: submit form without loading page 
Javascript :: kendo grid get all selected items 
Javascript :: regex space javascript 
Javascript :: protractor window size 
Javascript :: js create element 
Javascript :: javascript repeat element in array 
Javascript :: js hide element by class 
Javascript :: onclick go to url 
Javascript :: js get number from string 
Javascript :: Use Recursion to Create a Countdown 
Javascript :: the engine node is incompatible with this module 
Javascript :: adding integers jquery 
Javascript :: generate random email javascript 
Javascript :: https package node post request 
Javascript :: js document ready 
Javascript :: javascript remove last character 
Javascript :: javascript set delay 
Javascript :: javascript store in localstorage 
Javascript :: pass keyword in javascript 
Javascript :: fetch bearer token 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =