- editor.on( 'mode', function()\r
- {\r
- this.setState( this.modes[ editor.mode ] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED );\r
- this.setValue( '' );\r
- },\r
- this );\r
+ function updateState()\r
+ {\r
+ var state = this.modes[ editor.mode ] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED;\r
+ this.setState( editor.readOnly && !this.readOnly ? CKEDITOR.TRISTATE_DISABLED : state );\r
+ this.setValue( '' );\r
+ }\r
+\r
+ editor.on( 'mode', updateState, this );\r
+ // If this combo is sensitive to readOnly state, update it accordingly.\r
+ !this.readOnly && editor.on( 'readOnly', updateState, this);\r