1 /** 2 * undo button 3 * @author yiminghe@gmail.com 4 */ 5 KISSY.add("editor/plugin/undo/index", function (S, Editor, Btn, cmd) { 6 7 function undo() { 8 } 9 10 11 S.augment(undo, { 12 renderUI:function (editor) { 13 cmd.init(editor); 14 15 editor.addButton("undo", { 16 mode:Editor.WYSIWYG_MODE, 17 tooltip:"撤销", 18 editor:editor 19 }, Btn.UndoBtn); 20 21 editor.addButton("redo", { 22 mode:Editor.WYSIWYG_MODE, 23 tooltip:"重做", 24 editor:editor 25 }, Btn.RedoBtn); 26 } 27 }); 28 29 return undo; 30 }, { 31 requires:['editor', './btn', './cmd'] 32 });