Skip to content

Instantly share code, notes, and snippets.

@albburtsev
Created April 26, 2012 08:11
Show Gist options
  • Save albburtsev/2497428 to your computer and use it in GitHub Desktop.
Save albburtsev/2497428 to your computer and use it in GitHub Desktop.
tools.htmlToText = function(html) {
var node = document.createElement('b');
node.innerHTML = html;
return node.innerText || node.textContent || '';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment