/*\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\r
\r
\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
});\r
};\r
\r
- var config = editor.config;\r
- var lang = editor.lang;\r
+ var config = editor.config,\r
+ lang = editor.lang;\r
\r
- addButtonCommand( 'Bold' , lang.bold , 'bold' , config.coreStyles_bold );\r
+ addButtonCommand( 'Bold' , lang.bold , 'bold' , config.coreStyles_bold );\r
addButtonCommand( 'Italic' , lang.italic , 'italic' , config.coreStyles_italic );\r
- addButtonCommand( 'Underline' , lang.underline , 'underline' , config.coreStyles_underline );\r
+ addButtonCommand( 'Underline' , lang.underline , 'underline' , config.coreStyles_underline );\r
addButtonCommand( 'Strike' , lang.strike , 'strike' , config.coreStyles_strike );\r
- addButtonCommand( 'Subscript' , lang.subscript , 'subscript' , config.coreStyles_subscript );\r
- addButtonCommand( 'Superscript' , lang.superscript , 'superscript' , config.coreStyles_superscript );\r
+ addButtonCommand( 'Subscript' , lang.subscript , 'subscript' , config.coreStyles_subscript );\r
+ addButtonCommand( 'Superscript' , lang.superscript , 'superscript' , config.coreStyles_superscript );\r
}\r
});\r
\r
// Basic Inline Styles.\r
+\r
/**\r
- * The style definition to be used to apply the bold style in the text.\r
+ * The style definition that applies the <strong>bold</strong> style to the text.\r
* @type Object\r
+ * @default <code>{ element : 'strong', overrides : 'b' }</code>\r
* @example\r
* config.coreStyles_bold = { element : 'b', overrides : 'strong' };\r
* @example\r
- * config.coreStyles_bold = { element : 'span', attributes : {'class': 'Bold'} };\r
+ * config.coreStyles_bold =\r
+ * {\r
+ * element : 'span',\r
+ * attributes : { 'class' : 'Bold' }\r
+ * };\r
*/\r
-CKEDITOR.config.coreStyles_bold = { element : 'strong', overrides : 'b' };\r
+CKEDITOR.config.coreStyles_bold = { element : 'strong', overrides : 'b' };\r
+\r
/**\r
- * The style definition to be used to apply the italic style in the text.\r
+ * The style definition that applies the <em>italics</em> style to the text.\r
* @type Object\r
- * @default { element : 'em', overrides : 'i' }\r
+ * @default <code>{ element : 'em', overrides : 'i' }</code>\r
* @example\r
- * CKEDITOR.config.coreStyles_italic = { element : 'span', attributes : {'class': 'Italic'} };\r
+ * config.coreStyles_italic = { element : 'i', overrides : 'em' };\r
+ * @example\r
+ * CKEDITOR.config.coreStyles_italic =\r
+ * {\r
+ * element : 'span',\r
+ * attributes : { 'class' : 'Italic' }\r
+ * };\r
*/\r
-CKEDITOR.config.coreStyles_italic = { element : 'em', overrides : 'i' };\r
+CKEDITOR.config.coreStyles_italic = { element : 'em', overrides : 'i' };\r
+\r
/**\r
- * The style definition to be used to apply the underline style in the text.\r
+ * The style definition that applies the <u>underline</u> style to the text.\r
* @type Object\r
- * @default { element : 'u' }\r
+ * @default <code>{ element : 'u' }</code>\r
* @example\r
- * CKEDITOR.config.coreStyles_underline = { element : 'span', attributes : {'class': 'Underline'}};\r
+ * CKEDITOR.config.coreStyles_underline =\r
+ * {\r
+ * element : 'span',\r
+ * attributes : { 'class' : 'Underline' }\r
+ * };\r
*/\r
-CKEDITOR.config.coreStyles_underline = { element : 'u' };\r
+CKEDITOR.config.coreStyles_underline = { element : 'u' };\r
+\r
/**\r
- * The style definition to be used to apply the strike style in the text.\r
+ * The style definition that applies the <strike>strike-through</strike> style to the text.\r
* @type Object\r
- * @default { element : 'strike' }\r
+ * @default <code>{ element : 'strike' }</code>\r
* @example\r
- * CKEDITOR.config.coreStyles_strike = { element : 'span', attributes : {'class': 'StrikeThrough'}, overrides : 'strike' };\r
+ * CKEDITOR.config.coreStyles_strike =\r
+ * {\r
+ * element : 'span',\r
+ * attributes : { 'class' : 'StrikeThrough' },\r
+ * overrides : 'strike'\r
+ * };\r
*/\r
-CKEDITOR.config.coreStyles_strike = { element : 'strike' };\r
+CKEDITOR.config.coreStyles_strike = { element : 'strike' };\r
+\r
/**\r
- * The style definition to be used to apply the subscript style in the text.\r
+ * The style definition that applies the subscript style to the text.\r
* @type Object\r
- * @default { element : 'sub' }\r
+ * @default <code>{ element : 'sub' }</code>\r
* @example\r
- * CKEDITOR.config.coreStyles_subscript = { element : 'span', attributes : {'class': 'Subscript'}, overrides : 'sub' };\r
+ * CKEDITOR.config.coreStyles_subscript =\r
+ * {\r
+ * element : 'span',\r
+ * attributes : { 'class' : 'Subscript' },\r
+ * overrides : 'sub'\r
+ * };\r
*/\r
-CKEDITOR.config.coreStyles_subscript = { element : 'sub' };\r
+CKEDITOR.config.coreStyles_subscript = { element : 'sub' };\r
+\r
/**\r
- * The style definition to be used to apply the superscript style in the text.\r
+ * The style definition that applies the superscript style to the text.\r
* @type Object\r
- * @default { element : 'sup' }\r
+ * @default <code>{ element : 'sup' }</code>\r
* @example\r
- * CKEDITOR.config.coreStyles_superscript = { element : 'span', attributes : {'class': 'Superscript'}, overrides : 'sup' };\r
+ * CKEDITOR.config.coreStyles_superscript =\r
+ * {\r
+ * element : 'span',\r
+ * attributes : { 'class' : 'Superscript' },\r
+ * overrides : 'sup'\r
+ * };\r
*/\r
-CKEDITOR.config.coreStyles_superscript = { element : 'sup' };\r
+CKEDITOR.config.coreStyles_superscript = { element : 'sup' };\r