stripHtml() Function

Function

stripHtml( html )

Changes the provided HTML string into a plain text string by converting <br>, <p>, and <div> to line breaks, stripping all other tags, and converting escaped characters into their display values.

Parameters

Keyword Type Description

html

Text

the html text to be "stripped" of tags and converted to plain text.

Returns

Text

Usage considerations

Handling for classes and styles

striphtml() will not convert <br>, <p>, and <div> tags to line breaks if they contain additional classes or styles. For example, <div class="test"> or <div style="align:center"> would not be converted to line breaks.

Examples

You can experiment with this function in the test box below.

Test Input

=stripHtml("<p>Click <b>Save</b>.</p>") returns Click Save.

Open in Github Built: Fri, Oct 22, 2021 (11:11:24 AM)

On This Page

FEEDBACK