StripTags(html) Last updated: 13. Nov 2023
Removes all tags from a string
Parameters
Name | Type | Description |
---|---|---|
html | string | HTML string to remove all tags from. |
Returns
A string withouth HTML tags.
Example
Code example (#JS)
#JS is mixed HTML (or other text file) with inline JavaScript with # starting and ending each inline statement.#{
var html = "<a>Just <b>a</b> test</a>";
}#
<div>#docly.stripTags(html)#</div>
Output
The #JS code above produces the output shown below:<div>Just a test</div>