Ticket #1630: 1630_ref.patch
File 1630_ref.patch, 1.5 KB (added by , 16 years ago) |
---|
-
_source/plugins/undo/plugin.js
16 16 17 17 init : function( editor ) 18 18 { 19 var undoManager = new UndoManager( editor ); 19 // Make undoManager public inside editor instance. 20 var undoManager = editor.undoManager = new UndoManager( editor ); 20 21 21 22 var undoCommand = editor.addCommand( 'undo', 22 23 { -
_source/plugins/sourcearea/plugin.js
89 89 // The editor data "may be dirty" after this point. 90 90 editor.mayBeDirty = true; 91 91 92 // Inherit undo snapshots by textarea. 93 if ( editor.undoManager && editor.undoManager.hasUndo ) 94 { 95 var fixForBody = ( editor.config.enterMode != CKEDITOR.ENTER_BR ) 96 ? editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p' : false; 97 98 // Skip last snapshot. 99 for ( var i = 0 ; i < editor.undoManager.index ; i++ ) 100 { 101 var undoData = editor.undoManager.snapshots[ i ].contents; 102 103 if ( editor.dataProcessor ) 104 undoData = editor.dataProcessor.toDataFormat( undoData, fixForBody ); 105 106 this.loadData( undoData ); 107 } 108 } 109 92 110 // Set the <textarea> value. 93 111 this.loadData( data ); 94 112