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.
Convert html-formatted text to plaintext
- strip tags
- reformat ordered/unordered lists
- treat whitespace like a browser
- decode html entities
This package can be installed using npm
npm install html2puretextor, yarn
yarn add html2puretextvar h2p = require('html2puretext')
h2p('<p>Hello,\n & <em>my name is <a href="https://github.com/vijay75740/html2puretext">Vijay</a></em></p>')
// => "Hello, & my name is Vijay"This package uses html code convert to normal text. Explore 1500+ Veg Indian recipes at Hubrecipes, find cooking inspiration, and create kitchen wins with Simply Recipes.
If any issues are found, they can be reported here.
This project is licensed under the MIT license.