X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fstyles%2Fplugin.js;h=98b3eba78122934b1fe0cfe1db6dc783896aec9d;hb=refs%2Ftags%2Fv3.6;hp=4d75b2d601ceb9344b41f59379942ec52e5e6263;hpb=1056598c95187351dc58f4991d331e2258d038b5;p=ckeditor.git diff --git a/_source/plugins/styles/plugin.js b/_source/plugins/styles/plugin.js index 4d75b2d..98b3eba 100644 --- a/_source/plugins/styles/plugin.js +++ b/_source/plugins/styles/plugin.js @@ -213,7 +213,7 @@ CKEDITOR.STYLE_OBJECT = 3; // current style definition. checkElementRemovable : function( element, fullMatch ) { - if ( !element ) + if ( !element || element.isReadOnly() ) return false; var def = this._.definition, @@ -288,7 +288,7 @@ CKEDITOR.STYLE_OBJECT = 3; }, // Builds the preview HTML based on the styles definition. - buildPreview : function() + buildPreview : function( label ) { var styleDefinition = this._.definition, html = [], @@ -315,7 +315,7 @@ CKEDITOR.STYLE_OBJECT = 3; if ( cssStyle ) html.push( ' style="', cssStyle, '"' ); - html.push( '>', styleDefinition.name, '' ); + html.push( '>', ( label || styleDefinition.name ), '' ); return html.join( '' ); }