html2plaintext

Convert html-formatted text to plaintext

html2plaintext

Convert html-formatted text to plaintext

  • strip tags
  • reformat ordered/unordered lists
  • treat whitespace like a browser
  • decode html entities
var h2p = require('html2plaintext')

 h2p('<p>Hello,\n   &amp; <em>how  are you?</em></p>')
// => "Hello, & how are you?"
$ npm install html2plaintext

From project root:

$ npm install
$ npm test