Skip to content

html2puretext is a robust library designed for converting HTML content into clean, readable plaintext. This utility simplifies the transformation process by efficiently handling various HTML elements, including lists, styles, and scripts.

License

Notifications You must be signed in to change notification settings

vijay75740/html2puretext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

html2plaintext

Known Vulnerabilities supported node versions license: MIT npm version npm

html2puretext is a robust library designed for converting HTML content into clean, readable plaintext. This utility simplifies the transformation process by efficiently handling various HTML elements, including lists, styles, and scripts.

Getting started

Convert html-formatted text to plaintext

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

Installation

This package can be installed using npm

npm install html2puretext

or, yarn

yarn add html2puretext

Usage

var h2p = require('html2puretext')

h2p('<p>Hello,\n   &amp; <em>my name is <a href="https://github.com/vijay75740/html2puretext">Vijay</a></em></p>')
// => "Hello, & my name is Vijay"

Disclaimer

This package uses html code convert to normal text.

Issues

If any issues are found, they can be reported here.

License

This project is licensed under the MIT license.

About

html2puretext is a robust library designed for converting HTML content into clean, readable plaintext. This utility simplifies the transformation process by efficiently handling various HTML elements, including lists, styles, and scripts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published