Docly Developers
Function Updated 30 May 2026

stripTags(html)

Removes all tags from a string

Parameters

htmlstringrequired

HTML string to remove all tags from.

Returns

A string without HTML tags.

Example

Mixed HTML (or any text file) with inline JavaScript between hash signs.
#{
    let html = "<a>Just <b>a</b> test</a>";
}#
<div>#docly.stripTags(html)#</div>