1.1.1 • Published 7 years ago

html2plaintext-2 v1.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

html2plaintext

Convert html-formatted text to plaintext

  • strip tags
  • reformat ordered/unordered lists
  • treat whitespace like a browser
  • decode html entities

Use

var h2p = require('html2plaintext')

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

Install

npm install html2plaintext

Test

npm install
npm test

html2plaintext npm cdn at unpkg