User Tools

Site Tools




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)

Return Values

Value String Value
string The token content
token/gettext.txt · Last modified: 2017/06/03 14:08 (external edit)