What I can suggest in order to achieve the desired requirement is handling the ToolCommitted
event of the RadImageEditor and executing an Undo action when the current tool is the DrawTextTool. Here is some sample code:
sender, ToolCommittedEventArgs e)
In order to persist changes on a button click, you can use the CommitTool
method of the RadImageEditor. You can raise a boolean flag in your button click event which you can check inside the ToolCommited event in order to make sure not to Undo the commit when it is invoked through the button. Please, give this approach a try and let me know how it goes.
Hope you find this helpful.
Get quickly onboarded and successful
with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.