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.

The function cleantag() is located in the file token.jsxinc.

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 text as a string.

Return values

Value Meaning
string The tag type as a string.