Ticket #7694: 7694_2.patch

File 7694_2.patch, 900 bytes (added by Garry Yao, 14 years ago)
  • _source/plugins/styles/plugin.js

     
    815815        {
    816816                var root = range.getCommonAncestor( true, true ),
    817817                        element = root.getAscendant( this.element, true );
    818                 element && setupElement( element, this );
     818                element && !element.isReadOnly() && setupElement( element, this );
    819819        }
    820820
    821821        function removeObjectStyle( range )
     
    872872
    873873                while ( ( block = iterator.getNextParagraph() ) )               // Only one =
    874874                {
    875                         var newBlock = getElement( this, doc, block );
    876                         replaceBlock( block, newBlock );
    877                 }
     875                        if ( !block.isReadOnly() )
     876                        {
     877                                var newBlock = getElement( this, doc, block );
     878                                replaceBlock( block, newBlock );
     879                        }
     880                }
    878881
    879882                range.moveToBookmark( bookmark );
    880883        }
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy