Ticket #5124: 5124.patch

File 5124.patch, 1.1 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/styles/plugin.js

     
    350350
    351351                var styleRange;
    352352
    353                 // Indicates that that some useful inline content has been found, so
    354                 // the style should be applied.
    355                 var hasContents;
    356 
    357353                while ( currentNode )
    358354                {
    359355                        var applyStyle = false;
     
    424420                                                        if ( !includedNode.$.nextSibling )
    425421                                                                applyStyle = true;
    426422
    427                                                         if ( !hasContents )
    428                                                                 hasContents = ( nodeType != CKEDITOR.NODE_TEXT || (/[^\s\ufeff]/).test( currentNode.getText() ) );
    429423                                                }
    430424                                        }
    431425                                        else
     
    439433                        }
    440434
    441435                        // Apply the style if we have something to which apply it.
    442                         if ( applyStyle && hasContents && styleRange && !styleRange.collapsed )
     436                        if ( applyStyle && styleRange && !styleRange.collapsed )
    443437                        {
    444438                                // Build the style element, based on the style object definition.
    445439                                var styleNode = getElement( this, document );
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy