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
It's pretty simple, you can also implement a "toText" prototype:
String.prototype.toText = function(){
return $(html).text();
};
//Let's test it out!
var html = "link TEXT";
var text = html.toText();
console.log("Text: " + text); //Result will be "link TEXT"