Site Tools


Sidebar

New release candidate 3 available: 2020-06-09 "Hogfather". upgrade now! [51.2] (what's this?)
New release candidate 2 available: 2020-06-01 "Hogfather". upgrade now! [51.1] (what's this?)
New release candidate available: 2020-06-01 "Hogfather". upgrade now! [51] (what's this?)
Hotfix release available: 2018-04-22c "Greebo". upgrade now! [50.3] (what's this?)
token:cleantag

cleantag()

Function that returns the tag type of a tag as a string.

For example: When the function receives the following string:

<p class="myclass">

the function returns p. The function does not change the case of the tag.

Usage

To get the tag type of a token:

var tag = cleantag(token.name);

or:

var tag = cleantag('<p class="myclass">');

Parameters

Parameter Data type Required Description
tag string The full tag as a string

Return Values

Value String Value
string The tag type as a string
token/cleantag.txt · Last modified: 2020/02/26 17:10 (external edit)