Method to get the contents of an HTML or XML token, similar to .innerHTML
in JavaScript. The method can return text only or include all nested tags. This method is the equivalent of the function token_getText()
if(token.isTag("p")) { var paragraphText = token.getText(false); var paragraphHTML = token.getText(true); }
Parameter | Data type | Required | Description |
---|---|---|---|
includeHTML | boolean | Sets whether you want to get only the stripped text without HTML (false , default) or the full content (true ) |
Value | String Value |
---|---|
string | The token content |