html2plaintext

2.1.4 • Public • Published

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 <a href="https://me.com">you</a>?</em></p>')
// => "Hello, & how are you?"

Install

npm install html2plaintext

Test

npm install
npm test

Readme

Keywords

Package Sidebar

Install

npm i html2plaintext

Weekly Downloads

12,012

Version

2.1.4

License

MIT

Unpacked Size

8.45 kB

Total Files

5

Last publish

Collaborators

  • kurttheviking