+\r
+CKEDITOR.stylesSet = new CKEDITOR.resourceManager( '', 'stylesSet' );\r
+\r
+// Backward compatibility (#5025).\r
+CKEDITOR.addStylesSet = CKEDITOR.tools.bind( CKEDITOR.stylesSet.add, CKEDITOR.stylesSet );\r
+CKEDITOR.loadStylesSet = function( name, url, callback )\r
+ {\r
+ CKEDITOR.stylesSet.addExternal( name, url, '' );\r
+ CKEDITOR.stylesSet.load( name, callback );\r
+ };\r
+\r
+\r
+/**\r
+ * Gets the current styleSet for this instance\r
+ * @param {Function} callback The function to be called with the styles data.\r
+ * @example\r
+ * editor.getStylesSet( function( stylesDefinitions ) {} );\r
+ */\r
+CKEDITOR.editor.prototype.getStylesSet = function( callback )\r
+{\r
+ if ( !this._.stylesDefinitions )\r
+ {\r
+ var editor = this,\r
+ // Respect the backwards compatible definition entry\r
+ configStyleSet = editor.config.stylesCombo_stylesSet || editor.config.stylesSet || 'default';\r
+\r
+ // #5352 Allow to define the styles directly in the config object\r
+ if ( configStyleSet instanceof Array )\r
+ {\r
+ editor._.stylesDefinitions = configStyleSet;\r
+ callback( configStyleSet );\r
+ return;\r
+ }\r
+\r
+ var partsStylesSet = configStyleSet.split( ':' ),\r
+ styleSetName = partsStylesSet[ 0 ],\r
+ externalPath = partsStylesSet[ 1 ],\r
+ pluginPath = CKEDITOR.plugins.registered.styles.path;\r
+\r
+ CKEDITOR.stylesSet.addExternal( styleSetName,\r
+ externalPath ?\r
+ partsStylesSet.slice( 1 ).join( ':' ) :\r
+ pluginPath + 'styles/' + styleSetName + '.js', '' );\r
+\r
+ CKEDITOR.stylesSet.load( styleSetName, function( stylesSet )\r
+ {\r
+ editor._.stylesDefinitions = stylesSet[ styleSetName ];\r
+ callback( editor._.stylesDefinitions );\r
+ } ) ;\r
+ }\r
+ else\r
+ callback( this._.stylesDefinitions );\r
+};\r
+\r
+/**\r
+ * Indicates that fully selected read-only elements will be included when\r
+ * applying the style (for inline styles only).\r
+ * @name CKEDITOR.style.includeReadonly\r
+ * @type Boolean\r
+ * @default false\r
+ * @since 3.5\r
+ */\r
+\r
+ /**\r
+ * Disables inline styling on read-only elements.\r
+ * @name CKEDITOR.config.disableReadonlyStyling\r
+ * @type Boolean\r
+ * @default false\r
+ * @since 3.5\r
+ */\r
+\r
+/**\r
+ * The "styles definition set" to use in the editor. They will be used in the\r
+ * styles combo and the Style selector of the div container. <br>\r
+ * The styles may be defined in the page containing the editor, or can be\r
+ * loaded on demand from an external file. In the second case, if this setting\r
+ * contains only a name, the styles definition file will be loaded from the\r
+ * "styles" folder inside the styles plugin folder.\r
+ * Otherwise, this setting has the "name:url" syntax, making it\r
+ * possible to set the URL from which loading the styles file.<br>\r
+ * Previously this setting was available as config.stylesCombo_stylesSet<br>\r
+ * @name CKEDITOR.config.stylesSet\r
+ * @type String|Array\r
+ * @default 'default'\r
+ * @since 3.3\r
+ * @example\r
+ * // Load from the styles' styles folder (mystyles.js file).\r
+ * config.stylesSet = 'mystyles';\r
+ * @example\r
+ * // Load from a relative URL.\r
+ * config.stylesSet = 'mystyles:/editorstyles/styles.js';\r
+ * @example\r
+ * // Load from a full URL.\r
+ * config.stylesSet = 'mystyles:http://www.example.com/editorstyles/styles.js';\r
+ * @example\r
+ * // Load from a list of definitions.\r
+ * config.stylesSet = [\r
+ * { name : 'Strong Emphasis', element : 'strong' },\r
+ * { name : 'Emphasis', element : 'em' }, ... ];\r
+ */\r