Ticket #4117: 4117_2.patch
File 4117_2.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 editor.insertElement( this.imageElement ); 277 274 } 278 275 // ImageButton dialog and Image element. 279 276 else if ( dialogType != 'image' && imgTagName == 'img' && confirm( editor.lang.image.img2Button )) … … 287 284 alt : '' 288 285 } 289 286 ); 290 removeObj.insertBeforeMe( this.imageElement ); 291 removeObj.remove( false ); 287 editor.insertElement( this.imageElement ); 292 288 } 293 289 } 294 290 else // Create a new image. … … 320 316 //Insert a new Link. 321 317 if ( !this.linkEditMode ) 322 318 { 323 this.linkElement.append( this.imageElement, false );324 319 editor.insertElement( this.linkElement ); 320 this.linkElement.append( this.imageElement, false ); 325 321 } 326 322 else //Link already exists, image not. 327 323 this.linkElement.append( this.imageElement, false ); … … 334 330 //Add a new link element. 335 331 if ( !this.linkEditMode && this.addLink ) 336 332 { 337 this.imageElement.insertBeforeMe( this.linkElement );333 editor.insertElement( this.linkElement ); 338 334 this.imageElement.appendTo( this.linkElement ); 339 335 } 340 336 //Remove Link, Image exists. 341 337 else if ( this.linkEditMode && !this.addLink ) 342 this.linkElement.remove( true);338 editor.insertElement( this.imageElement ); 343 339 } 344 340 }, 345 341 onLoad : function()