Ticket #6103: 6103_2.patch

File 6103_2.patch, 2.4 KB (added by Garry Yao, 13 years ago)
  • _source/plugins/styles/plugin.js

     
    102102                        :
    103103                                CKEDITOR.STYLE_INLINE;
    104104
     105                // Inline styles must leave read-only elements retained. (#6103)
     106                if ( this.type == CKEDITOR.STYLE_INLINE )
     107                {
     108                        styleDefinition.parentRule = CKEDITOR.tools.override( styleDefinition.parentRule,
     109                        function( org )
     110                        {
     111                                return function( element ) { return org && org( element ) || !element.isReadOnly(); }
     112                        });
     113                }
     114               
    105115                this._ =
    106116                {
    107117                        definition : styleDefinition
     
    464474
    465475                                                }
    466476                                        }
    467                                         else
    468                                                 applyStyle = true;
     477
    469478                                }
    470479                                else
    471480                                        applyStyle = true;
  • _source/plugins/selection/plugin.js

     
    792792                                                                walkerRange.setEndAfter( endContainer );
    793793                                                }
    794794
    795                                                 // Looking for non-editable element inside the range.
     795                                                // Looking for non-editable blocks inside the range.
    796796                                                var walker = new CKEDITOR.dom.walker( walkerRange );
    797797                                                walker.evaluator = function( node )
    798798                                                {
    799799                                                        if ( node.type == CKEDITOR.NODE_ELEMENT
    800                                                                 && node.getAttribute( 'contenteditable' ) == 'false' )
     800                                                                && node.getAttribute( 'contenteditable' ) == 'false'
     801                                                                && node.isBlockBoundary() )
    801802                                                        {
    802803                                                                var newRange = range.clone();
    803804                                                                range.setEndBefore( node );
  • _source/plugins/colorbutton/plugin.js

     
    101101
    102102                                                colorStyle.childRule = type == 'back' ?
    103103                                                        // It's better to apply background color as the innermost style. (#3599)
    104                                                         function(){ return false; } :
     104                                                        function( element ){ return element.isReadOnly(); } :
    105105                                                        // Fore color style must be applied inside links instead of around it.
    106                                                         function( element ){ return element.getName() != 'a'; };
     106                                                        function( element ){ return element.isReadOnly() || element.getName() != 'a'; };
    107107
    108108                                                new CKEDITOR.style( colorStyle, { color : color } ).apply( editor.document );
    109109                                        }
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy