Created
February 18, 2021 21:42
-
-
Save bjoerntx/bab54502be1ce21123c2ffd6449a58b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function removeAllChanges(accept) { | |
TXTextControl.trackedChanges.getCount(count => { | |
if (count === 0) return; | |
// recursively loop through all changes | |
// and remove them | |
TXTextControl.trackedChanges.elementAt(0, element => { | |
TXTextControl.trackedChanges.remove(element, accept, deleted => { | |
if (deleted === true) removeAllChanges(accept); | |
}); | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment