Previous Topic

Next Topic

HTMLToText - MaxBasic Function

HTMLToText(HTML: String): String

Given an encoded HTML, returns a string containing the textual representation of the rendered HTML. HTML tags are removed, HTML entities are decoded and block elements become line breaks. If HTML is an empty string, an empty string is returned.

HTMLToText function has these named arguments:

Parameter

Description

HTML

Required. The string of HTML to render as text.

Sample code:

  html = "<p>There is a <u><b>growing</b></u> realisation&ndash; that</p>"
  HTMLText = HTMLToText(HTML)
  Print HTMLText

Returns: There is a growing realisation– that

See Also

Web Functions

Book Contents

Book Index