Ticket #3717: 3717.patch

File 3717.patch, 30.9 KB (added by Artur Formella, 14 years ago)
  • _source/plugins/basicstyles/plugin.js

     
    4141        }
    4242});
    4343
    44 // Basic Inline Styles.
    45 CKEDITOR.config.coreStyles_bold                 = { element : 'strong', overrides : 'b' };
    46 CKEDITOR.config.coreStyles_italic               = { element : 'em', overrides : 'i' };
    47 CKEDITOR.config.coreStyles_underline    = { element : 'u' };
    48 CKEDITOR.config.coreStyles_strike               = { element : 'strike' };
    49 CKEDITOR.config.coreStyles_subscript    = { element : 'sub' };
    50 CKEDITOR.config.coreStyles_superscript  = { element : 'sup' };
     44(function()
     45{
     46        var config = CKEDITOR.config;
     47
     48        // Basic Inline Styles.
     49        config.coreStyles_bold                  = config.coreStyles_bold || { element : 'strong', overrides : 'b' };
     50        config.coreStyles_italic                = config.coreStyles_italic || { element : 'em', overrides : 'i' };
     51        config.coreStyles_underline             = config.coreStyles_underline || { element : 'u' };
     52        config.coreStyles_strike                = config.coreStyles_strike || { element : 'strike' };
     53        config.coreStyles_subscript             = config.coreStyles_subscript || { element : 'sub' };
     54        config.coreStyles_superscript   = config.coreStyles_superscript || { element : 'sup' };
     55
     56})();
  • _source/plugins/colorbutton/plugin.js

     
    136136        }
    137137});
    138138
    139 CKEDITOR.config.colorButton_enableMore = false;
    140 CKEDITOR.config.colorButton_colors =
    141         '000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,' +
    142         'B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,' +
    143         'F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,' +
    144         'FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,' +
    145         'FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';
     139(function()
     140{
     141        var config = CKEDITOR.config;
    146142
    147 CKEDITOR.config.colorButton_foreStyle =
    148         {
    149                 element         : 'span',
    150                 styles          : { 'color' : '#(color)' },
    151                 overrides       : [ { element : 'font', attributes : { 'color' : null } } ]
    152         };
     143        config.colorButton_enableMore = config.colorButton_enableMore || false;
     144        config.colorButton_colors = config.colorButton_colors ||
     145                '000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,' +
     146                'B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,' +
     147                'F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,' +
     148                'FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,' +
     149                'FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';
    153150
    154 CKEDITOR.config.colorButton_backStyle =
    155         {
    156                 element         : 'span',
    157                 styles          : { 'background-color' : '#(color)' }
    158         };
     151        config.colorButton_foreStyle = config.colorButton_foreStyle ||
     152                {
     153                        element         : 'span',
     154                        styles          : { 'color' : '#(color)' },
     155                        overrides       : [ { element : 'font', attributes : { 'color' : null } } ]
     156                };
     157
     158        config.colorButton_backStyle = config.colorButton_backStyle ||
     159                {
     160                        element         : 'span',
     161                        styles          : { 'background-color' : '#(color)' }
     162                };
     163
     164})();
  • _source/plugins/dialog/plugin.js

     
    26322632        });
    26332633
    26342634// Dialog related configurations.
     2635(function()
     2636{
     2637        var config = CKEDITOR.config;
    26352638
    2636 /**
    2637  * The color of the dialog background cover. It should be a valid CSS color
    2638  * string.
    2639  * @type String
    2640  * @default white
    2641  * @example
    2642  * config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)';
    2643  */
    2644 CKEDITOR.config.dialog_backgroundCoverColor = 'white';
     2639        /**
     2640        * The color of the dialog background cover. It should be a valid CSS color
     2641        * string.
     2642        * @type String
     2643        * @default white
     2644        * @example
     2645        * config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)';
     2646        */
     2647        config.dialog_backgroundCoverColor = config.dialog_backgroundCoverColor || 'white';
    26452648
    2646 /**
    2647  * The opacity of the dialog background cover. It should be a number within the
    2648  * range [0.0, 1.0].
    2649  * @type Number
    2650  * @default 0.5
    2651  * @example
    2652  * config.dialog_backgroundCoverOpacity = 0.7;
    2653  */
    2654 CKEDITOR.config.dialog_backgroundCoverOpacity = 0.5;
     2649        /**
     2650        * The opacity of the dialog background cover. It should be a number within the
     2651        * range [0.0, 1.0].
     2652        * @type Number
     2653        * @default 0.5
     2654        * @example
     2655        * config.dialog_backgroundCoverOpacity = 0.7;
     2656        */
     2657        config.dialog_backgroundCoverOpacity = config.dialog_backgroundCoverOpacity || 0.5;
    26552658
    2656 /**
    2657  * The distance of magnetic borders used in moving and resizing dialogs,
    2658  * measured in pixels.
    2659  * @type Number
    2660  * @default 20
    2661  * @example
    2662  * config.dialog_magnetDistance = 30;
    2663  */
    2664 CKEDITOR.config.dialog_magnetDistance = 20;
     2659        /**
     2660         * The distance of magnetic borders used in moving and resizing dialogs,
     2661         * measured in pixels.
     2662         * @type Number
     2663         * @default 20
     2664         * @example
     2665         * config.dialog_magnetDistance = 30;
     2666         */
     2667        config.dialog_magnetDistance = config.dialog_magnetDistance || 20;
     2668
     2669})();
     2670
  • _source/plugins/editingblock/plugin.js

     
    199199                if ( mode )
    200200                        mode.focus();
    201201        };
    202 })();
    203202
    204 /**
    205  * The mode to load at the editor startup. It depends on the plugins
    206  * loaded. By default, the "wysiwyg" and "source" modes are available.
    207  * @type String
    208  * @default 'wysiwyg'
    209  * @example
    210  * config.toolbarLocation = 'source';
    211  */
    212 CKEDITOR.config.startupMode = 'wysiwyg';
    213203
    214 /**
    215  * Sets whether the editor should have the focus when the page loads.
    216  * @type Boolean
    217  * @default false
    218  */
    219 CKEDITOR.config.startupFocus = false;
     204        var config = CKEDITOR.config;
     205        /**
     206         * The mode to load at the editor startup. It depends on the plugins
     207         * loaded. By default, the "wysiwyg" and "source" modes are available.
     208         * @type String
     209         * @default 'wysiwyg'
     210         * @example
     211         * config.toolbarLocation = 'source';
     212         */
     213        config.startupMode = config.startupMode || 'wysiwyg';
    220214
    221 CKEDITOR.config.editingBlock = true;
     215        /**
     216         * Sets whether the editor should have the focus when the page loads.
     217         * @type Boolean
     218         * @default false
     219         */
     220        config.startupFocus = config.startupFocus || false;
     221
     222        config.editingBlock = config.editingBlock || true;
     223
     224})();
     225
  • _source/plugins/entities/plugin.js

     
    145145        });
    146146})();
    147147
    148 CKEDITOR.config.entities = true;
    149 CKEDITOR.config.entities_latin = true;
    150 CKEDITOR.config.entities_greek = true;
    151 CKEDITOR.config.entities_processNumerical = false;
    152 CKEDITOR.config.entities_additional = '#39';
     148(function()
     149{
     150        var config = CKEDITOR.config;
     151        config.entities =                                       config.entities || true;
     152        config.entities_latin =                         config.entities_latin || true;
     153        config.entities_greek =                         config.entities_greek || true;
     154        config.entities_processNumerical =      config.entities_processNumerical || false;
     155        config.entities_additional =            config.entities_additional || '#39';
     156
     157})();
  • _source/plugins/find/plugin.js

     
    3232} );
    3333
    3434// Styles for highlighting search results.
    35 CKEDITOR.config.find_highlight = { element : 'span', styles : { 'background-color' : '#004', 'color' : '#fff' } };
     35CKEDITOR.config.find_highlight = CKEDITOR.config.find_highlight || { element : 'span', styles : { 'background-color' : '#004', 'color' : '#fff' } };
  • _source/plugins/font/plugin.js

     
    115115                        addCombo( editor, 'FontSize', 'size', editor.lang.fontSize, config.fontSize_sizes, config.fontSize_defaultLabel, config.fontSize_style );
    116116                }
    117117        });
    118 })();
    119118
    120 // Font settings.
    121119
    122 CKEDITOR.config.font_names =
    123         'Arial/Arial, Helvetica, sans-serif;' +
    124         'Comic Sans MS/Comic Sans MS, cursive;' +
    125         'Courier New/Courier New, Courier, monospace;' +
    126         'Georgia/Georgia, serif;' +
    127         'Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;' +
    128         'Tahoma/Tahoma, Geneva, sans-serif;' +
    129         'Times New Roman/Times New Roman, Times, serif;' +
    130         'Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;' +
    131         'Verdana/Verdana, Geneva, sans-serif';
     120        // Font settings.
     121        var config = CKEDITOR.config;
    132122
    133 CKEDITOR.config.font_defaultLabel = '';
    134 CKEDITOR.config.font_style =
    135         {
    136                 element         : 'span',
    137                 styles          : { 'font-family' : '#(family)' },
    138                 overrides       : [ { element : 'font', attributes : { 'face' : null } } ]
    139         };
     123        config.font_names = config.font_names ||
     124                'Arial/Arial, Helvetica, sans-serif;' +
     125                'Comic Sans MS/Comic Sans MS, cursive;' +
     126                'Courier New/Courier New, Courier, monospace;' +
     127                'Georgia/Georgia, serif;' +
     128                'Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;' +
     129                'Tahoma/Tahoma, Geneva, sans-serif;' +
     130                'Times New Roman/Times New Roman, Times, serif;' +
     131                'Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;' +
     132                'Verdana/Verdana, Geneva, sans-serif';
    140133
    141 // Font Size setting.
     134        config.font_defaultLabel = config.font_defaultLabel || '';
     135        config.font_style = config.font_style ||
     136                {
     137                        element         : 'span',
     138                        styles          : { 'font-family' : '#(family)' },
     139                        overrides       : [ { element : 'font', attributes : { 'face' : null } } ]
     140                };
    142141
    143 CKEDITOR.config.fontSize_sizes =
    144         '8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px';
     142        // Font Size setting.
    145143
    146 CKEDITOR.config.fontSize_defaultLabel = '';
    147 CKEDITOR.config.fontSize_style =
    148         {
    149                 element         : 'span',
    150                 styles          : { 'font-size' : '#(size)' },
    151                 overrides       : [ { element : 'font', attributes : { 'face' : null } } ]
    152         };
     144        config.fontSize_sizes = config.fontSize_sizes ||
     145                '8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px';
     146
     147        config.fontSize_defaultLabel = config.fontSize_defaultLabel || '';
     148        config.fontSize_style = config.fontSize_style ||
     149                {
     150                        element         : 'span',
     151                        styles          : { 'font-size' : '#(size)' },
     152                        overrides       : [ { element : 'font', attributes : { 'face' : null } } ]
     153                };
     154
     155})();
  • _source/plugins/format/plugin.js

     
    8787        }
    8888});
    8989
    90 CKEDITOR.config.format_tags = 'p;h1;h2;h3;h4;h5;h6;pre;address;div';
     90(function()
     91{
     92        var config = CKEDITOR.config;
    9193
    92 CKEDITOR.config.format_p                = { element : 'p' };
    93 CKEDITOR.config.format_div              = { element : 'div' };
    94 CKEDITOR.config.format_pre              = { element : 'pre' };
    95 CKEDITOR.config.format_address  = { element : 'address' };
    96 CKEDITOR.config.format_h1               = { element : 'h1' };
    97 CKEDITOR.config.format_h2               = { element : 'h2' };
    98 CKEDITOR.config.format_h3               = { element : 'h3' };
    99 CKEDITOR.config.format_h4               = { element : 'h4' };
    100 CKEDITOR.config.format_h5               = { element : 'h5' };
    101 CKEDITOR.config.format_h6               = { element : 'h6' };
     94        config.format_tags = 'p;h1;h2;h3;h4;h5;h6;pre;address;div';
     95
     96        config.format_p                 = config.format_p || { element : 'p' };
     97        config.format_div               = config.format_div || { element : 'div' };
     98        config.format_pre               = config.format_pre || { element : 'pre' };
     99        config.format_address   = config.format_address || { element : 'address' };
     100        config.format_h1                = config.format_h1 || { element : 'h1' };
     101        config.format_h2                = config.format_h2 || { element : 'h2' };
     102        config.format_h3                = config.format_h3 || { element : 'h3' };
     103        config.format_h4                = config.format_h4 || { element : 'h4' };
     104        config.format_h5                = config.format_h5 || { element : 'h5' };
     105        config.format_h6                = config.format_h6 || { element : 'h6' };
     106
     107})();
  • _source/plugins/htmldataprocessor/plugin.js

     
    256256        };
    257257})();
    258258
    259 CKEDITOR.config.forceSimpleAmpersand = false;
     259CKEDITOR.config.forceSimpleAmpersand = CKEDITOR.config.forceSimpleAmpersand || false;
  • _source/plugins/image/plugin.js

     
    5454        }
    5555} );
    5656
    57 /**
    58  * Show Browse Server button.
    59  * @type Boolean
    60  * @default true
    61  */
    62 CKEDITOR.config.image_browseServer = true;
    6357
    64 /**
    65  * Upload action attribute.
    66  * @type URL
    67  */
    68 CKEDITOR.config.image_uploadAction = 'nowhere.php';
     58(function()
     59{
     60        var config = CKEDITOR.config;
     61        /**
     62         * Show Browse Server button.
     63         * @type Boolean
     64         * @default true
     65         */
     66        config.image_browseServer = config.image_browseServer || true;
    6967
    70 CKEDITOR.config.image_removeLinkByEmptyURL = true;
     68        /**
     69         * Upload action attribute.
     70         * @type URL
     71         */
     72        config.image_uploadAction = config.image_uploadAction || 'nowhere.php';
     73
     74        config.image_removeLinkByEmptyURL = config.image_removeLinkByEmptyURL || true;
     75
     76})();
  • _source/plugins/keystrokes/plugin.js

     
    153153 * @type Array
    154154 * @example
    155155 */
    156 CKEDITOR.config.blockedKeystrokes =
     156CKEDITOR.config.blockedKeystrokes = CKEDITOR.config.blockedKeystrokes ||
    157157[
    158158        CKEDITOR.CTRL + 66 /*B*/,
    159159        CKEDITOR.CTRL + 73 /*I*/,
     
    167167 * @type Array
    168168 * @example
    169169 */
    170 CKEDITOR.config.keystrokes =
     170CKEDITOR.config.keystrokes = CKEDITOR.config.keystrokes ||
    171171[
    172172        [ CKEDITOR.ALT + 121 /*F10*/, 'toolbarFocus' ],
    173173        [ CKEDITOR.ALT + 122 /*F11*/, 'elementsPathFocus' ],
  • _source/plugins/menu/plugin.js

     
    342342        }
    343343});
    344344
    345 CKEDITOR.config.menu_subMenuDelay = 400;
    346 CKEDITOR.config.menu_groups =
     345CKEDITOR.config.menu_subMenuDelay = CKEDITOR.config.menu_subMenuDelay || 400;
     346CKEDITOR.config.menu_groups = CKEDITOR.config.menu_groups ||
    347347        'clipboard,' +
    348348        'form,' +
    349349        'tablecell,tablecellproperties,tablerow,tablecolumn,table,'+
  • _source/plugins/newpage/plugin.js

     
    3131        }
    3232});
    3333
    34 CKEDITOR.config.newpage_html = '';
     34CKEDITOR.config.newpage_html = CKEDITOR.config.newpage_html || '';
  • _source/plugins/pastefromword/plugin.js

     
    2222        }
    2323} );
    2424
    25 CKEDITOR.config.pasteFromWordIgnoreFontFace = true;
    26 CKEDITOR.config.pasteFromWordRemoveStyle = false;
    27 CKEDITOR.config.pasteFromWordKeepsStructure = false;
     25(function()
     26{
     27        var config = CKEDITOR.config;
     28        config.pasteFromWordIgnoreFontFace = config.pasteFromWordIgnoreFontFace || true;
     29        config.pasteFromWordRemoveStyle = config.pasteFromWordRemoveStyle || false;
     30        config.pasteFromWordKeepsStructure = config.pasteFromWordKeepsStructure || false;
     31
     32})();
  • _source/plugins/pastetext/plugin.js

     
    127127        this.insertHtml( text );
    128128};
    129129
    130 CKEDITOR.config.forcePasteAsPlainText = false;
     130CKEDITOR.config.forcePasteAsPlainText = CKEDITOR.config.forcePasteAsPlainText || false;
  • _source/plugins/removeformat/plugin.js

     
    114114};
    115115
    116116// Only inline elements are valid.
    117 CKEDITOR.config.removeFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';
     117CKEDITOR.config.removeFormatTags = CKEDITOR.config.removeFormatTags || 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';
    118118
    119 CKEDITOR.config.removeFormatAttributes = 'class,style,lang,width,height,align,hspace,valign';
     119CKEDITOR.config.removeFormatAttributes = CKEDITOR.config.removeFormatAttributes || 'class,style,lang,width,height,align,hspace,valign';
  • _source/plugins/resize/plugin.js

     
    6969        }
    7070} );
    7171
    72 CKEDITOR.config.resize_minWidth = 750;
    73 CKEDITOR.config.resize_minHeight = 250;
    74 CKEDITOR.config.resize_maxWidth = 3000;
    75 CKEDITOR.config.resize_maxHeight = 3000;
    76 CKEDITOR.config.resize_enabled = true;
     72(function()
     73{
     74        var config = CKEDITOR.config;
     75
     76        config.resize_minWidth =        config.resize_minWidth || 750;
     77        config.resize_minHeight =       config.resize_minHeight || 250;
     78        config.resize_maxWidth =        config.resize_maxWidth || 3000;
     79        config.resize_maxHeight =       config.resize_maxHeight || 3000;
     80        config.resize_enabled =         config.resize_enabled || true;
     81
     82})();
  • _source/plugins/scayt/plugin.js

     
    465465        });
    466466})();
    467467
    468 CKEDITOR.config.scayt_maxSuggestions = 5;
    469 CKEDITOR.config.scayt_autoStartup = false;
     468
     469CKEDITOR.config.scayt_maxSuggestions = CKEDITOR.config.scayt_maxSuggestions || 5;
     470CKEDITOR.config.scayt_autoStartup = CKEDITOR.config.scayt_autoStartup || false;
  • _source/plugins/showblocks/plugin.js

     
    135135        });
    136136} )();
    137137
    138 CKEDITOR.config.startupOutlineBlocks = false;
     138CKEDITOR.config.startupOutlineBlocks = CKEDITOR.config.startupOutlineBlocks || false;
  • _source/plugins/smiley/plugin.js

     
    1919        }
    2020} );
    2121
    22 CKEDITOR.config.smiley_path = CKEDITOR.basePath +  '_source/plugins/smiley/images/';
     22(function()
     23{
     24        var config = CKEDITOR.config;
     25        config.smiley_path = config.smiley_path || CKEDITOR.basePath +  '_source/plugins/smiley/images/';
    2326
    24 CKEDITOR.config.smiley_images = [ 'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif',
    25         'embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif',
    26         'devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif',
    27         'broken_heart.gif','kiss.gif','envelope.gif'];
     27        config.smiley_images = config.smiley_images || [ 'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif',
     28                'embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif',
     29                'devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif',
     30                'broken_heart.gif','kiss.gif','envelope.gif'];
    2831
    29 CKEDITOR.config.smiley_descriptions = [ ':)', ':(', ';)', ':D', ':/', ':P', '', '', '', '', '', '', '', ';(', '', '', '', '', ':kiss', '' ];
     32        config.smiley_descriptions = config.smiley_descriptions || [ ':)', ':(', ';)', ':D', ':/', ':P', '', '', '', '', '', '', '', ';(', '', '', '', '', ':kiss', '' ];
    3033
    31 CKEDITOR.config.smiley_columns = 8;
     34        config.smiley_columns = config.smiley_columns || 8;
     35})();
  • _source/plugins/stylescombo/plugin.js

     
    272272        }
    273273})();
    274274
    275 CKEDITOR.config.stylesCombo_stylesSet = 'default';
     275CKEDITOR.config.stylesCombo_stylesSet = CKEDITOR.config.stylesCombo_stylesSet || 'default';
  • _source/plugins/tab/plugin.js

     
    263263 * @example
    264264 * config.tabSpaces = 4;
    265265 */
    266 CKEDITOR.config.tabSpaces = 0 ;
     266CKEDITOR.config.tabSpaces = CKEDITOR.config.tabSpaces || 0;
  • _source/plugins/templates/plugin.js

     
    6666 * @type String
    6767 * @default 'default'
    6868 */
    69 CKEDITOR.config.templates = 'default';
     69CKEDITOR.config.templates = CKEDITOR.config.templates || 'default';
    7070
    7171/**
    7272 * The list of templates definition files to load.
    7373 * @type (String) Array
    7474 * @default [ 'plugins/templates/templates/default.js' ]
    7575 */
    76 CKEDITOR.config.templates_files =
     76CKEDITOR.config.templates_files = CKEDITOR.config.templates_files ||
    7777        [
    7878                CKEDITOR.getUrl(
    7979                        '_source/' + // %REMOVE_LINE%
     
    8686 * @type Boolean
    8787 * @default true
    8888 */
    89 CKEDITOR.config.templates_replaceContent = true;
     89CKEDITOR.config.templates_replaceContent = CKEDITOR.config.templates_replaceContent || true;
  • _source/plugins/toolbar/plugin.js

     
    288288        }
    289289};
    290290
    291 /**
    292  * The "theme space" to which rendering the toolbar. For the default theme,
    293  * the recommended options are "top" and "bottom".
    294  * @type String
    295  * @default 'top'
    296  * @see CKEDITOR.config.theme
    297  * @example
    298  * config.toolbarLocation = 'bottom';
    299  */
    300 CKEDITOR.config.toolbarLocation = 'top';
     291(function()
     292{
     293        var config = CKEDITOR.config;
    301294
    302 /**
    303  * The toolbar definition. It is an array of toolbars (strips),
    304  * each one being also an array, containing a list of UI items.
    305  * @type Array
    306  * @example
    307  * // Defines a toolbar with only one strip containing the "Source" button, a
    308  * // separator and the "Bold" and "Italic" buttons.
    309  * <b>CKEDITOR.config.toolbar_Basic =
    310  * [
    311  *     [ 'Source', '-', 'Bold', 'Italic' ]
    312  * ]</b>;
    313  */
    314 CKEDITOR.config.toolbar_Basic =
    315 [
    316         ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink','-','About']
    317 ];
     295        /**
     296         * The "theme space" to which rendering the toolbar. For the default theme,
     297         * the recommended options are "top" and "bottom".
     298         * @type String
     299         * @default 'top'
     300         * @see CKEDITOR.config.theme
     301         * @example
     302         * config.toolbarLocation = 'bottom';
     303         */
     304        config.toolbarLocation = config.toolbarLocation || 'top';
    318305
    319 CKEDITOR.config.toolbar_Full =
    320 [
    321         ['Source','-','Save','NewPage','Preview','-','Templates'],
    322         ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
    323         ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
    324         ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
    325         '/',
    326         ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
    327         ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
    328         ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
    329         ['Link','Unlink','Anchor'],     ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],
    330         '/',
    331         ['Styles','Format','Font','FontSize'],
    332         ['TextColor','BGColor'],
    333         ['Maximize', 'ShowBlocks','-','About']
    334 ];
     306        /**
     307         * The toolbar definition. It is an array of toolbars (strips),
     308         * each one being also an array, containing a list of UI items.
     309         * @type Array
     310         * @example
     311         * // Defines a toolbar with only one strip containing the "Source" button, a
     312         * // separator and the "Bold" and "Italic" buttons.
     313         * <b>CKEDITOR.config.toolbar_Basic =
     314         * [
     315         *     [ 'Source', '-', 'Bold', 'Italic' ]
     316         * ]</b>;
     317         */
     318        config.toolbar_Basic = config.toolbar_Basic ||
     319        [
     320                ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink','-','About']
     321        ];
    335322
    336 /**
    337  * The toolbox (alias toolbar) definition. It is a toolbar name or an array of toolbars (strips),
    338  * each one being also an array, containing a list of UI items.
    339  * @type Array or String
    340  * @example
    341  * // Defines a toolbar with only one strip containing the "Source" button, a
    342  * // separator and the "Bold" and "Italic" buttons.
    343  * <b>CKEDITOR.config.toolbar =
    344  * [
    345  *     [ 'Source', '-', 'Bold', 'Italic' ]
    346  * ]</b>;
    347  * // Load toolbar_Name where Name = Basic.
    348  * <b>CKEDITOR.config.toolbar = 'Basic';
    349  */
    350 CKEDITOR.config.toolbar = 'Full';
     323        config.toolbar_Full = config.toolbar_Full ||
     324        [
     325                ['Source','-','Save','NewPage','Preview','-','Templates'],
     326                ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
     327                ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
     328                ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
     329                '/',
     330                ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
     331                ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
     332                ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
     333                ['Link','Unlink','Anchor'],     ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],
     334                '/',
     335                ['Styles','Format','Font','FontSize'],
     336                ['TextColor','BGColor'],
     337                ['Maximize', 'ShowBlocks','-','About']
     338        ];
    351339
    352 CKEDITOR.config.toolbarCanCollapse = true;
    353 CKEDITOR.config.toolbarStartupExpanded = true;
     340        /**
     341         * The toolbox (alias toolbar) definition. It is a toolbar name or an array of toolbars (strips),
     342         * each one being also an array, containing a list of UI items.
     343         * @type Array or String
     344         * @example
     345         * // Defines a toolbar with only one strip containing the "Source" button, a
     346         * // separator and the "Bold" and "Italic" buttons.
     347         * <b>CKEDITOR.config.toolbar =
     348         * [
     349         *     [ 'Source', '-', 'Bold', 'Italic' ]
     350         * ]</b>;
     351         * // Load toolbar_Name where Name = Basic.
     352         * <b>CKEDITOR.config.toolbar = 'Basic';
     353         */
     354        config.toolbar = config.toolbar || 'Full';
     355
     356        config.toolbarCanCollapse = config.toolbarCanCollapse || true;
     357        config.toolbarStartupExpanded = config.toolbarStartupExpanded || true;
     358
     359})();
  • _source/plugins/undo/plugin.js

     
    481481        };
    482482})();
    483483
    484 CKEDITOR.config.undoStackSize = 20;
     484CKEDITOR.config.undoStackSize = CKEDITOR.config.undoStackSize || 20;
  • _source/plugins/wysiwygarea/plugin.js

     
    530530                                });
    531531                }
    532532        });
    533 })();
    534533
    535 /**
    536  * Disables the ability of resize objects (image and tables) in the editing
    537  * area
    538  * @type Boolean
    539  * @default false
    540  * @example
    541  * config.disableObjectResizing = true;
    542  */
    543 CKEDITOR.config.disableObjectResizing = false;
     534        var config = CKEDITOR.config;
    544535
    545 /**
    546  * Disables the "table tools" offered natively by the browser (currently
    547  * Firefox only) to make quick table editing operations, like adding or
    548  * deleting rows and columns.
    549  * @type Boolean
    550  * @default true
    551  * @example
    552  * config.disableNativeTableHandles = false;
    553  */
    554 CKEDITOR.config.disableNativeTableHandles = true;
     536        /**
     537         * Disables the ability of resize objects (image and tables) in the editing
     538         * area
     539         * @type Boolean
     540         * @default false
     541         * @example
     542         * config.disableObjectResizing = true;
     543         */
     544        config.disableObjectResizing = config.disableObjectResizing || false;
    555545
    556 /**
    557  * Disables the built-in spell checker while typing natively available in the
    558  * browser (currently Firefox and Safari only).<br /><br />
    559  *
    560  * Even if word suggestions will not appear in the CKEditor context menu, this
    561  * feature is useful to help quickly identifying misspelled words.<br /><br />
    562  *
    563  * This setting is currently compatible with Firefox only due to limitations in
    564  * other browsers.
    565  * @type Boolean
    566  * @default true
    567  * @example
    568  * config.disableNativeSpellChecker = false;
    569  */
    570 CKEDITOR.config.disableNativeSpellChecker = true;
    571 /**
    572  * The editor will post an empty value ("") if you have just an empty paragraph on it, like this:
    573  * @example
    574  * <p></p>
    575  * <p><br /></p>
    576  * <p><b></b></p>
    577  */
    578 CKEDITOR.config.ignoreEmptyParagraph = true;
     546        /**
     547         * Disables the "table tools" offered natively by the browser (currently
     548         * Firefox only) to make quick table editing operations, like adding or
     549         * deleting rows and columns.
     550         * @type Boolean
     551         * @default true
     552         * @example
     553         * config.disableNativeTableHandles = false;
     554         */
     555        config.disableNativeTableHandles = config.disableNativeTableHandles || true;
     556
     557        /**
     558         * Disables the built-in spell checker while typing natively available in the
     559         * browser (currently Firefox and Safari only).<br /><br />
     560         *
     561         * Even if word suggestions will not appear in the CKEditor context menu, this
     562         * feature is useful to help quickly identifying misspelled words.<br /><br />
     563         *
     564         * This setting is currently compatible with Firefox only due to limitations in
     565         * other browsers.
     566         * @type Boolean
     567         * @default true
     568         * @example
     569         * config.disableNativeSpellChecker = false;
     570         */
     571        config.disableNativeSpellChecker = config.disableNativeSpellChecker || true;
     572        /**
     573         * The editor will post an empty value ("") if you have just an empty paragraph on it, like this:
     574         * @example
     575         * <p></p>
     576         * <p><br /></p>
     577         * <p><b></b></p>
     578         */
     579        config.ignoreEmptyParagraph = config.ignoreEmptyParagraph || true;
     580
     581})();
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy