mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ef10672364
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92488 467b73ca-7a2a-4603-9d3b-597d59a354a9
39 lines
763 B
JavaScript
39 lines
763 B
JavaScript
/**
|
|
* $Id: EditorCommands.js 1042 2009-03-04 16:00:50Z spocke $
|
|
*
|
|
* @author Moxiecode
|
|
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
|
|
*/
|
|
|
|
(function() {
|
|
var cmds = tinymce.GlobalCommands;
|
|
|
|
cmds.add(['mceEndUndoLevel', 'mceAddUndoLevel'], function() {
|
|
this.undoManager.add();
|
|
});
|
|
|
|
cmds.add('Undo', function() {
|
|
var ed = this;
|
|
|
|
if (ed.settings.custom_undo_redo) {
|
|
ed.undoManager.undo();
|
|
ed.nodeChanged();
|
|
return true;
|
|
}
|
|
|
|
return false; // Run browser command
|
|
});
|
|
|
|
cmds.add('Redo', function() {
|
|
var ed = this;
|
|
|
|
if (ed.settings.custom_undo_redo) {
|
|
ed.undoManager.redo();
|
|
ed.nodeChanged();
|
|
return true;
|
|
}
|
|
|
|
return false; // Run browser command
|
|
});
|
|
})();
|