Function: htmlToText()
htmlToText(
html):string
Reduce a full HTML document to readable plain text: drop <script> /
<style> / <noscript> blocks and comments, turn block-level tags into
newlines, strip the remaining tags, decode entities, and collapse runs of
blank lines / trailing spaces. Unlike htmlFragmentToText, this
preserves line structure because paragraph breaks carry meaning in a page.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string