Skip to content

Instantly share code, notes, and snippets.

@marco-souza
Created February 21, 2017 12:22
Show Gist options
  • Save marco-souza/918c06340ce3caacafd4772f650720c2 to your computer and use it in GitHub Desktop.
Save marco-souza/918c06340ce3caacafd4772f650720c2 to your computer and use it in GitHub Desktop.
Strip text from HTML content
let stripHTML = (str) => {
let holder = document.createElement('div');
holder.innerHTML = str;
return holder.innerText;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment