1. html2plaintext
Convert HTML-formatted text to plaintext
html2plaintext
Package: html2plaintext
Created by: kurttheviking
Last modified: Sat, 18 Jun 2022 22:02:09 GMT
Version: 2.1.4
License: MIT
Downloads: 54,311
Repository: https://github.com/kurttheviking/html2plaintext

Install

npm install html2plaintext
yarn add html2plaintext

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

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code