Ticket #5546: 5546.patch
File 5546.patch, 2.5 KB (added by , 14 years ago) |
---|
-
_source/plugins/scayt/plugin.js
133 133 } 134 134 } 135 135 }); 136 136 editor.on( 'afterCommandExec', function( ev ) 137 { 138 139 if ( !plugin.isScaytEnabled(editor) ) 140 return; 141 142 if ( ev.data.name == 'undo' || ev.data.name == 'redo' && editor.mode == 'wysiwyg' ) 143 { 144 var scayt_instance = plugin.getScayt( editor ); 145 window.setTimeout(function(){scayt_instance.refresh()},0); 146 } 147 }); 137 148 editor.on( 'destroy', function( ev ) 138 149 { 139 150 var editor = ev.editor, … … 213 224 ); 214 225 } 215 226 227 var undoImagePrototype = CKEDITOR.plugins.undo.Image.prototype; 228 undoImagePrototype.equals = CKEDITOR.tools.override( undoImagePrototype.equals, function( org ) 229 { 230 return function( otherImage ) 231 { 232 var thisContents = this.contents, 233 otherContents = otherImage.contents; 234 235 // Making the comparison based on content without SCAYT word markers. 236 this.contents = plugin.getScayt( this.editor ).reset( thisContents ); 237 otherImage.contents = plugin.getScayt( this.editor ).reset( otherContents ); 238 239 var retval = org.apply( this, arguments ); 240 241 this.contents = thisContents; 242 otherImage.contents = otherContents; 243 return retval; 244 } 245 }); 246 216 247 if ( editor.document ) 217 248 createInstance(); 218 249 }; -
_source/plugins/undo/plugin.js
117 117 } 118 118 }); 119 119 120 // Gets a snapshot image which represent the current document status. 121 function Image( editor ) 120 CKEDITOR.plugins.undo = {}; 121 122 /** 123 * Undo snapshot which represents the current document status. 124 * @name CKEDITOR.plugins.undo.Image 125 * @param editor The editor instance on which the image is created. 126 */ 127 var Image = CKEDITOR.plugins.undo.Image = function( editor ) 122 128 { 129 this.editor = editor; 123 130 var contents = editor.getSnapshot(), 124 131 selection = contents && editor.getSelection(); 125 132 … … 128 135 129 136 this.contents = contents; 130 137 this.bookmarks = selection && selection.createBookmarks2( true ); 131 } 138 }; 132 139 133 140 // Attributes that browser may changing them when setting via innerHTML. 134 141 var protectedAttrs = /\b(?:href|src|name)="[^"]*?"/gi;