Ticket #3235: 3235_2.patch

File 3235_2.patch, 2.3 KB (added by Artur Formella, 15 years ago)
  • _source/plugins/toolbar/plugin.js

     
    108108                                                var output = [ '<div class="cke_toolbox">' ];
    109109
    110110                                                var toolbars = editor.toolbox.toolbars,
    111                                                         toolbar = editor.config.toolbar;
     111                                                        toolbar =
     112                                                                        ( editor.config.toolbar instanceof Array ) ?
     113                                                                                editor.config.toolbar
     114                                                                        :
     115                                                                                editor.config[ 'toolbar_' + editor.config.toolbar ];
    112116
    113117                                                for ( var r = 0 ; r < toolbar.length ; r++ )
    114118                                                {
     
    212216CKEDITOR.config.toolbarLocation = 'top';
    213217
    214218/**
    215  * The toolbox (alias toolbar) definition. It is an array of toolbars (strips),
     219 * The toolbar definition. It is an array of toolbars (strips),
    216220 * each one being also an array, containing a list of UI items.
    217221 * @type Array
    218222 * @example
    219223 * // Defines a toolbar with only one strip containing the "Source" button, a
    220224 * // separator and the "Bold" and "Italic" buttons.
    221  * <b>CKEDITOR.config.toolbar =
     225 * <b>CKEDITOR.config.toolbar_Basic =
    222226 * [
    223227 *     [ 'Source', '-', 'Bold', 'Italic' ]
    224228 * ]</b>;
    225229 */
    226 CKEDITOR.config.toolbar =
     230CKEDITOR.config.toolbar_Basic =
    227231[
     232        ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ]
     233];
     234
     235CKEDITOR.config.toolbar_Full =
     236[
    228237        ['Source','-','Save','NewPage','Preview','-','Templates'],
    229238        ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker'],
    230239        ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
     
    239248        ['TextColor','BGColor'],
    240249        ['ShowBlocks']
    241250];
     251
     252/**
     253 * The toolbox (alias toolbar) definition. It is a toolbar name or an array of toolbars (strips),
     254 * each one being also an array, containing a list of UI items.
     255 * @type Array or String
     256 * @example
     257 * // Defines a toolbar with only one strip containing the "Source" button, a
     258 * // separator and the "Bold" and "Italic" buttons.
     259 * <b>CKEDITOR.config.toolbar =
     260 * [
     261 *     [ 'Source', '-', 'Bold', 'Italic' ]
     262 * ]</b>;
     263 * // Load toolbar_Name where Name = Basic.
     264 * <b>CKEDITOR.config.toolbar = 'Basic';
     265 */
     266CKEDITOR.config.toolbar = 'Full';
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy