This is a migrated thread and some comments may be shown as answers.

Custom Button Does Not Add to Undo List

1 Answer 58 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Logan
Top achievements
Rank 1
Logan asked on 14 Jun 2011, 10:21 PM
Hi,

I have implemented a couple of customized buttons. I have noticed that when the button's functionality is executed that nothing is added to the undo stack (i.e. you cannot undo the action performed with the button). While I know that it is possible to programmatically clear and remove from the undo stack on the client, is there a way for me to programmatically add to the undo stack? I would like to be able to undo the actions that are performed by my custom buttons.

Thanks,
Logan

1 Answer, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 17 Jun 2011, 02:26 PM
Hi Logan,

You can use the following syntax to add a custom command to the Undo / Redo list:


var
oCmd = new Telerik.Web.UI.Editor.GenericCommand("MyCustomAction", editor.get_contentWindow(), editor);
editor.executeCommand(oCmd);



Kind regards,
Rumen
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Editor
Asked by
Logan
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or