Convert HTML to Text

Verb: htmlToText

Available from: <Standard>

Converts HTML to text by removing all tags from HTML syntax, returning only the text contained within.

Syntax

htmlToText --html(String) (String)=value

Inputs

Script Designer Required AcceptedTypes Description
--html HTML Required Text Content in HTML format that should be converted to text.

Outputs

Script Designer AcceptedTypes Description
value Text Text Returns the text from HTML without HTML tags.

Example

Converts HTML to text by removing all tags.

defVar --name convertedText --type String
defVar --name htmlText --type String --value "Insert HTML text here."
// Convert HTML to text.
htmlToText --html "${htmlText}" convertedText=value
logMessage --message "${convertedText}" --type "Info"
Download File

Remarks

If the content inserted in the HTML parameter is not in "HTML" format, the return of Text will be the same text inserted.

See Also

  • Add Escape Characters to Regular Expression
  • Add Escape Characters to Text
  • Calculate Hash
  • Change Text Case
  • Check File
  • Concatenate Texts
  • Count Occurrences in Text
  • Count Text Characters
  • Create Random Text
  • Create Table By Regular Expression
  • Empty or Null Text Variable
  • Find by Regular Expression
  • Find Occurrences in Text
  • Format Text
  • Get Subtext
  • Get Text from Regular Expression
  • HTML to Markdown
  • Insert New Line to Text
  • Join Text
  • Pad Text
  • Parse URI
  • Remove Diacritics
  • Remove Escape Characters
  • Replace Part of Text
  • Replace Text
  • Split Text
  • Trim Text Blanks