Ticket #4117: 4117.patch
File 4117.patch, 3.0 KB (added by , 15 years ago) |
---|
-
CHANGES.html
187 187 <li><a href="http://dev.fckeditor.net/ticket/4097">#4097</a> : No undo/redo support for fontColor and backgroundColor buttons.</li> 188 188 <li><a href="http://dev.fckeditor.net/ticket/4111">#4111</a> : Fixed apply block style after inline style applied on full document error.</li> 189 189 <li><a href="http://dev.fckeditor.net/ticket/3622">#3622</a> : Fixed shift enter with selection not deleting highlighted text.</li> 190 <li><a href="http://dev.fckeditor.net/ticket/4117">#4117</a> : Fixed dialog error when transforming image into button.</li> 190 191 </ul> 191 192 <h3> 192 193 CKEditor 3.0 RC</h3> -
_source/plugins/image/dialogs/image.js
261 261 // Edit existing Image. 262 262 if ( this.imageEditMode ) 263 263 { 264 var imgTagName = this.imageEditMode, 265 removeObj = this.imageElement; 264 var imgTagName = this.imageEditMode; 266 265 267 266 // Image dialog and Input element. 268 267 if ( dialogType == 'image' && imgTagName == 'input' && confirm( editor.lang.image.button2Img ) ) … … 271 270 imgTagName = 'img'; 272 271 this.imageElement = editor.document.createElement( 'img' ); 273 272 this.imageElement.setAttribute( 'alt', '' ); 274 removeObj.insertBeforeMe( this.imageElement );275 removeObj.remove( false );276 273 277 274 } 278 275 // ImageButton dialog and Image element. … … 287 284 alt : '' 288 285 } 289 286 ); 290 removeObj.insertBeforeMe( this.imageElement );291 removeObj.remove( false );292 287 } 288 editor.insertElement( this.imageElement ); 293 289 } 294 290 else // Create a new image. 295 291 { … … 312 308 this.commitContent( IMAGE, this.imageElement ); 313 309 this.commitContent( LINK, this.linkElement ); 314 310 311 debugger; 315 312 // Insert a new Image. 316 313 if ( !this.imageEditMode ) 317 314 { … … 320 317 //Insert a new Link. 321 318 if ( !this.linkEditMode ) 322 319 { 323 this.linkElement.append( this.imageElement, false );324 320 editor.insertElement( this.linkElement ); 321 this.linkElement.append( this.imageElement, false ); 325 322 } 326 323 else //Link already exists, image not. 327 324 this.linkElement.append( this.imageElement, false ); … … 334 331 //Add a new link element. 335 332 if ( !this.linkEditMode && this.addLink ) 336 333 { 337 this.imageElement.insertBeforeMe( this.linkElement );334 editor.insertElement( this.linkElement ); 338 335 this.imageElement.appendTo( this.linkElement ); 339 336 } 340 337 //Remove Link, Image exists. 341 338 else if ( this.linkEditMode && !this.addLink ) 342 this. linkElement.remove( true);339 this.editor.insertElement( this.imageElement ); 343 340 } 344 341 }, 345 342 onLoad : function()