Hello, I have a function that formats the text in the syntaxEditor and then sets the formatted stirng back to the syntaxEditors.text property. I see in the forums here that setting the syntaxEditors.text property clears the undo stack. I also see answers talking about syntaxEditors.Document.UndoableInsert which sounds like what i want, however my control doesnt seem to have that function. Basically what im trying to accomplish is to take the unformatted text from the syntaxEditor, then format it in some function, then set the formatted text back to the syntaxEditor, while still retaining the undo stack, so that the user can undo the formatting if they choose. How can i accomplish this?