X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fstyles%2Fplugin.js;fp=_source%2Fplugins%2Fstyles%2Fplugin.js;h=26519c6bbc3b913b517b2da7173a600ada590256;hb=6e682412d5cc0dfaedb376482e585bf2989c6863;hp=2c16b7e6716096104d81c4658df10dcda2969eda;hpb=2f22c0c38f17e75be5541089076885442aaa2377;p=ckeditor.git diff --git a/_source/plugins/styles/plugin.js b/_source/plugins/styles/plugin.js index 2c16b7e..26519c6 100644 --- a/_source/plugins/styles/plugin.js +++ b/_source/plugins/styles/plugin.js @@ -218,9 +218,8 @@ CKEDITOR.STYLE_OBJECT = 3; return true; }, - // Checks if an element, or any of its attributes, is removable by the - // current style definition. - checkElementRemovable : function( element, fullMatch ) + // Check if the element matches the current style definition. + checkElementMatch : function( element, fullMatch ) { var def = this._.definition; @@ -266,10 +265,23 @@ CKEDITOR.STYLE_OBJECT = 3; return true; } - // Check if the element can be somehow overriden. + return false; + }, + + // Checks if an element, or any of its attributes, is removable by the + // current style definition. + checkElementRemovable : function( element, fullMatch ) + { + // Check element matches the style itself. + if ( this.checkElementMatch( element, fullMatch ) ) + return true; + + // Check if the element matches the style overrides. var override = getOverrides( this )[ element.getName() ] ; if ( override ) { + var attribs, attName; + // If no attributes have been defined, remove the element. if ( !( attribs = override.attributes ) ) return true;