Ticket #5497: plugin.patch

File plugin.patch, 1.1 KB (added by Gilles van den Hoven, 13 years ago)

Patch for new config variable

  • plugin.js

     
    3939                                                }
    4040
    4141                                                // Sorts the Array, so the styles get grouped by type.
    42                                                 stylesList.sort( sortStyles );
     42                                                if (editor.config.stylesGroupStyles && editor.config.stylesGroupStyles == true)
     43                                                        stylesList.sort( sortStyles );
    4344                                        }
    4445
    4546                                        callback && callback();
     
    7980
    8081                                                                        if ( type != lastType )
    8182                                                                        {
    82                                                                                 combo.startGroup( lang[ 'panelTitle' + String( type ) ] );
     83                                                                                if (editor.config.stylesGroupStyles && editor.config.stylesGroupStyles == true)
     84                                                                                        combo.startGroup( lang[ 'panelTitle' + String( type ) ] );
    8385                                                                                lastType = type;
    8486                                                                        }
    8587
     
    201203                        typeB == CKEDITOR.STYLE_BLOCK ? 1 :
    202204                        -1;
    203205        }
     206
     207
     208        /**
     209         * A boolean indicating if the loaded styles have to be grouped by type, which can be overwritten.
     210         * @type Boolean
     211         * @default true
     212         * @example
     213         */
     214        CKEDITOR.config.stylesGroupStyles = true;
    204215})();
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy