Ticket #8055: 8055_3.patch
File 8055_3.patch, 1.6 KB (added by , 13 years ago) |
---|
-
_source/plugins/table/dialogs/table.js
523 523 { 524 524 var caption = nodeList.getItem( 0 ); 525 525 526 var innerHtml = caption.getHtml().replace(/<br>\s*$/i, ''), 527 innerText = caption.getText(); 528 529 if ( innerHtml != innerText ) 526 var firstElementChild = caption.getFirst( CKEDITOR.dom.walker.nodeType( CKEDITOR.NODE_ELEMENT ) ) 527 if ( firstElementChild && !firstElementChild.equals( caption.getBogus() ) ) 530 528 { 531 529 this.disable(); 532 this.setValue( innerText);530 this.setValue( caption.getText() ); 533 531 return; 534 532 } 535 533 … … 547 545 if ( caption ) 548 546 { 549 547 if ( captionElement.count() > 0 ) 550 {551 548 captionElement = captionElement.getItem( 0 ); 552 captionElement.setHtml( '' );553 }554 549 else 555 550 { 556 551 captionElement = new CKEDITOR.dom.element( 'caption', editor.document ); 557 if ( table.getChildCount() ) 558 captionElement.insertBefore( table.getFirst() ); 559 else 560 captionElement.appendTo( table ); 552 captionElement.appendTo( table, 1 ); 561 553 } 562 captionElement.append( new CKEDITOR.dom.text( caption, editor.document ) ); 554 555 captionElement.setText( caption ); 563 556 } 564 557 else if ( captionElement.count() > 0 ) 565 558 {