Site Tools


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?)


Function to delete a token, its corresponding ending tag if it exists and optional also the token's content. The script detects whether the token is a tag and whether the token has a corresponding end tag. If an end tag exists, the start tag and the end tag will be removed from the file. If the token is regular text or a tag without an end tag (such as img tags), only the token will be removed. This function is the equivalent of the method .balancedDelete()


To delete only the token and retain its content

token_balancedDelete(token, false);

To delete the token and remove its content <code javascript> token_balancedDelete(token, true); <code>


Parameter Data type Required Description
token Token object true The token to delete
contentdelete boolean true If true, the function deletes not only the tag but also all the content of the tag. If false, the function only deletes the tag and the end tag (if it exists). Default is false

Return Values

Value String Value
true Token deleted
null Method encountered an error
token/token_balanceddelete.txt · Last modified: 2020/02/26 17:10 (external edit)