JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.6
[ckeditor.git] / _source / plugins / basicstyles / plugin.js
index 74507e3..aa00e9a 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
 \r
@@ -17,7 +17,7 @@ CKEDITOR.plugins.add( 'basicstyles',
 \r
                        editor.attachStyleStateChange( style, function( state )\r
                                {\r
-                                       editor.getCommand( commandName ).setState( state );\r
+                                       !editor.readOnly && editor.getCommand( commandName ).setState( state );\r
                                });\r
 \r
                        editor.addCommand( commandName, new CKEDITOR.styleCommand( style ) );\r