User Tools

Site Tools


Sidebar

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: 2017/06/03 14:16 (external edit)