Ticket #7870: 7870.patch
File 7870.patch, 1.9 KB (added by , 13 years ago) |
---|
-
_source/plugins/bbcode/plugin.js
557 557 if ( tag in bbcodeMap ) 558 558 { 559 559 if ( this.getRule( tag, 'breakBeforeOpen' ) ) 560 this.lineBreak( 1);560 this.lineBreak(); 561 561 562 562 this.write( '[', tag ); 563 563 var option = attributes.option; … … 565 565 this.write( ']' ); 566 566 567 567 if ( this.getRule( tag, 'breakAfterOpen' ) ) 568 this.lineBreak( 1);568 this.lineBreak(); 569 569 } 570 570 else if ( tag == 'br' ) 571 571 this._.output.push( '\n' ); 572 else if ( tag == 'block' ) 573 this.lineBreak(); 572 574 }, 573 575 574 576 openTagClose : function() { }, … … 579 581 if ( tag in bbcodeMap ) 580 582 { 581 583 if ( this.getRule( tag, 'breakBeforeClose' ) ) 582 this.lineBreak( 1);584 this.lineBreak(); 583 585 584 586 tag != '*' && this.write( '[/', tag, ']' ); 585 587 586 588 if ( this.getRule( tag, 'breakAfterClose' ) ) 587 this.lineBreak( 1);589 this.lineBreak(); 588 590 } 591 else if ( tag == 'block' ) 592 this.lineBreak(); 589 593 }, 590 594 591 595 text : function( text ) … … 603 607 comment : function() {}, 604 608 605 609 /* 606 * Output line-break for formatting. 610 * Output a soft line-break for formatting, it only introduces 611 * real line-break only when there's no existence. 607 612 */ 608 613 lineBreak : function() 609 614 { … … 852 857 else 853 858 element.children = [ new CKEDITOR.htmlParser.text( src ) ]; 854 859 } 860 // "block" is just a formatting element lives outside of bbcode map, 861 // whose tag name will not be outputted, just wraps content with line-breaks. (#7870) 862 else if ( tagName in CKEDITOR.dtd.$block ) 863 tagName = 'block'; 855 864 856 865 element.name = tagName; 857 866 value && ( element.attributes.option = value );