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

[Solved] Custom Undo/Redo

2 Answers 170 Views
Editor
This is a migrated thread and some comments may be shown as answers.
RJ
Top achievements
Rank 1
RJ asked on 28 Sep 2009, 08:45 PM
Hi, I wanted to create a custon undo and redo for I still need to make some changes for other controls when user uses undo or redo.. Where can I find the code that will make my custom tool mimic undo and redo.. Thanks in advance..

RJ

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 29 Sep 2009, 01:30 PM
Hello,

You could attach the ' OnClientCommandExecuted ' and check for the CommandName in order to execute your code while invoking undo/redo.

JavaScript:
 
<script type='text/javascript'
function OnClientCommandExecuted(sender, args) 
    if(args.get_commandName() == "Undo"
    { 
        //Your code 
    } 
    if(args.get_commandName() == "Redo"
    { 
        //Your code 
    } 
</script> 

-Shinu.
0
RJ
Top achievements
Rank 1
answered on 29 Sep 2009, 06:42 PM
Thanks a lot Shinu
Tags
Editor
Asked by
RJ
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
RJ
Top achievements
Rank 1
Share this question
or