Ticket #3580: 3580_3.patch
File 3580_3.patch, 1.7 KB (added by , 15 years ago) |
---|
-
_source/plugins/undo/plugin.js
85 85 undoManager.type(); 86 86 }); 87 87 88 // Being this the first call, let's get an undo snapshot.89 if ( undoManager.index == -1 )90 undoManager.save();88 // Always save an undo snapshot - the previous mode might have changed 89 // editor contents. 90 undoManager.save( true ); 91 91 } 92 92 } 93 93 else … … 284 284 285 285 if ( image.bookmarks ) 286 286 this.editor.getSelection().selectBookmarks( image.bookmarks ); 287 else if ( CKEDITOR.env.ie ) 288 { 289 // IE BUG: If I don't set the selection to *somewhere* after setting 290 // document contents, then IE would create an empty paragraph at the bottom 291 // the next time the document is modified. 292 $range = this.editor.document.getBody().$.createTextRange(); 293 $range.collapse( true ); 294 $range.select(); 295 } 287 296 288 297 this.index = image.index; 289 298 -
_source/plugins/sourcearea/plugin.js
186 186 187 187 exec : function( editor ) 188 188 { 189 if ( editor.mode == 'wysiwyg' ) 190 editor.fire( 'saveSnapshot' ); 189 191 editor.getCommand( 'source' ).setState( CKEDITOR.TRISTATE_DISABLED ); 190 192 editor.setMode( editor.mode == 'source' ? 'wysiwyg' : 'source' ); 191 } 193 }, 194 195 canUndo : false 192 196 } 193 197 } 194 198 };