Skip to content
npm module: convert html-formatted text to plaintext
JavaScript
Find file
Latest commit 7d08ba5 kurttheviking update readme, tick patch, prep for new repo home

README.md

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

From project root:

$ npm install
$ npm test
Something went wrong with that request. Please try again.