Ticket #3611: 3611.patch

File 3611.patch, 2.0 KB (added by Josh Nisly, 15 years ago)
  • _source/plugins/styles/plugin.js

     
    8181        var objectElements      = { a:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,ul:1 };
    8282
    8383        var semicolonFixRegex = /\s*(?:;\s*|$)/;
     84        var removeValueRegex = /([^:]+:)([^;]+);/g;
    8485
    8586        CKEDITOR.style = function( styleDefinition, variablesValues )
    8687        {
     
    197198                                        {
    198199                                                if ( attName == '_length' )
    199200                                                        continue;
    200                                                 if ( attribs[attName] == element.getAttribute( attName ) )
     201                                                var testAttrib = attribs[ attName ];
     202                                                var elementAttrib = element.getAttribute( attName );
     203
     204                                                // If ignoring the values, simply remove them so that they're not compared.
     205                                                if ( def.ignore_values )
    201206                                                {
     207                                                        testAttrib = testAttrib.replace( removeValueRegex, '\1;' );
     208                                                        elementAttrib = elementAttrib.replace( removeValueRegex, '\1;' );
     209                                                }
     210                                               
     211                                                if ( testAttrib == elementAttrib )
     212                                                {
    202213                                                        if ( !fullMatch )
    203214                                                                return true;
    204215                                                }
  • _source/plugins/colorbutton/plugin.js

     
    1 /*
     1/*
    22Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
    33For licensing, see LICENSE.html or http://ckeditor.com/license
    44*/
     
    148148        {
    149149                element         : 'span',
    150150                styles          : { 'color' : '#(color)' },
    151                 overrides       : [ { element : 'font', attributes : { 'color' : null } } ]
     151                overrides       : [ { element : 'font', attributes : { 'color' : null } } ],
     152                ignore_values : true
    152153        };
    153154
    154155CKEDITOR.config.colorButton_backStyle =
    155156        {
    156157                element         : 'span',
    157                 styles          : { 'background-color' : '#(color)' }
     158                styles          : { 'background-color' : '#(color)' },
     159                ignore_values : true
    158160        };
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy