I have a CouchDB view map function that generates an abstract of a stored HTML document (first x characters of text). Unfortunately I have no browser environmen
With TextVersionJS (http://textversionjs.com) you can convert your HTML to plain text. It's pure javascript (with tons of RegExps) so you can use it in the browser and in node.js as well.
In node.js it looks like:
var createTextVersion = require("textversionjs");
var yourHtml = "Your HTML
- goes
- here.
";
var textVersion = createTextVersion(yourHtml);
(I copied the example from the page, you will have to npm install the module first.)