Ticket #7037: 7037.patch

File 7037.patch, 846 bytes (added by Garry Yao, 13 years ago)
  • _source/plugins/styles/plugin.js

     
    895895
    896896                var block;
    897897                while ( ( block = iterator.getNextParagraph() ) )
    898                         this.checkElementRemovable( block ) && removeFromElement( this, block, 1 );
     898                {
     899                        if ( this.checkElementRemovable( block ) )
     900                        {
     901                                // <pre> get special treatment.
     902                                if ( block.is( 'pre' ) )
     903                                {
     904                                        var newBlock = range.document.createElement(
     905                                                        this._.enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' );
     906                                        block.copyAttributes( newBlock );
     907                                        replaceBlock( block, newBlock );
     908                                }
     909                                else
     910                                         removeFromElement( this, block, 1 );
     911                        }
     912                }
    899913
    900914                range.moveToBookmark( bookmark );
    901915        }
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy