Convert HTML to formatted text
npm install html-to-formatted-text





Converts HTML to formatted plain text.
From:
Some text. More text."Even more text."
To:
``
Some text.
More text.
Even more text.
`
`bash`
npm install --save html-to-formatted-text
` foo barjavascript`
const htmlToFormattedText = require("html-to-formatted-text");
htmlToFormattedText("
` foo barjavascript`
// ES6
import htmlToFormattedText from "html-to-formatted-text";
htmlToFormattedText("
`html`
You might have HTML that you want to display as text.
One use case might be that a user adds HTML via an online editor TinyMCE and you want to display this as plain text somewhere else.
- Create an issue on Github
- Fork project
- Make changes then use npm run commit` to make commits
- Create a pull request