html to text

This block is part of the value group and was last modified in core v15.0.2.

html to text v15.0.2

Turns HTML into one line of plain text: tags removed, every HTML entity decoded and whitespace collapsed. Set max length to cut the text on a word boundary.

In pins 2
  • html value required

    The HTML to convert.

  • max length number

    The longest the text may be, in characters. It is cut on a word boundary. Leave empty or 0 for no limit.

Out pins 2
  • value value
  • truncated condition

    True when the text was cut to max length. Nothing is appended to it; add an ellipsis yourself if you want one.

Outputs the plain text of the html input as ONE line: script, style, head and title elements are dropped with their contents, comments removed, block boundaries/breaks/list items/table cells become a space, every other tag is removed without a space (a<b>c</b> -> "ac"), then ALL HTML entities are decoded (named and numeric; &nbsp; becomes a space) and runs of whitespace collapse to one space, trimmed. Entities are decoded after the tags are gone, so escaped markup stays visible ("&lt;b&gt;" -> "<b>"). max_length > 0 caps the result at that many characters (not bytes), ending on a word boundary: a word the cap falls inside is dropped, a single word longer than the cap is cut hard. No ellipsis is appended; truncated is true when anything was cut. Unwired html outputs "". Example: "<p>Hello&nbsp;<b>world</b></p><p>A &amp; B</p>" -> "Hello world A & B".

strip html
strip tags
html to plain text
remove html

Version history

Introduced in v15.0.2.


Back to value Return to the main group to view all sub-groups Back to value Return to the group to view all blocks within this group