2 Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
\r
3 For licensing, see LICENSE.html or http://ckeditor.com/license
\r
7 * @fileOverview Defines the {@link CKEDITOR.config} object, which holds the
\r
8 * default configuration settings.
\r
12 * Used in conjuction with {@link CKEDITOR.config.enterMode} and
\r
13 * {@link CKEDITOR.config.shiftEnterMode} to make the editor produce <p>
\r
14 * tags when using the ENTER key.
\r
17 CKEDITOR.ENTER_P = 1;
\r
20 * Used in conjuction with {@link CKEDITOR.config.enterMode} and
\r
21 * {@link CKEDITOR.config.shiftEnterMode} to make the editor produce <br>
\r
22 * tags when using the ENTER key.
\r
25 CKEDITOR.ENTER_BR = 2;
\r
28 * Used in conjuction with {@link CKEDITOR.config.enterMode} and
\r
29 * {@link CKEDITOR.config.shiftEnterMode} to make the editor produce <div>
\r
30 * tags when using the ENTER key.
\r
33 CKEDITOR.ENTER_DIV = 3;
\r
36 * @namespace Holds the default configuration settings. Changes to this object are
\r
37 * reflected in all editor instances, if not specificaly specified for those
\r
43 * The URL path for the custom configuration file to be loaded. If not
\r
44 * overloaded with inline configurations, it defaults to the "config.js"
\r
45 * file present in the root of the CKEditor installation directory.<br /><br />
\r
47 * CKEditor will recursively load custom configuration files defined inside
\r
48 * other custom configuration files.
\r
50 * @default '<CKEditor folder>/config.js'
\r
52 * // Load a specific configuration file.
\r
53 * CKEDITOR.replace( 'myfiled', { customConfig : '/myconfig.js' } );
\r
55 * // Do not load any custom configuration file.
\r
56 * CKEDITOR.replace( 'myfiled', { customConfig : '' } );
\r
58 customConfig : 'config.js',
\r
61 * Whether the replaced element (usually a textarea) is to be updated
\r
62 * automatically when posting the form containing the editor.
\r
66 * config.autoUpdateElement = true;
\r
68 autoUpdateElement : true,
\r
71 * The base href URL used to resolve relative and absolute URLs in the
\r
74 * @default '' (empty)
\r
76 * config.baseHref = 'http://www.example.com/path/';
\r
81 * The CSS file(s) to be used to apply style to the contents. It should
\r
82 * reflect the CSS used in the final pages where the contents are to be
\r
84 * @type String|Array
\r
85 * @default '<CKEditor folder>/contents.css'
\r
87 * config.contentsCss = '/css/mysitestyles.css';
\r
88 * config.contentsCss = ['/css/mysitestyles.css', '/css/anotherfile.css'];
\r
90 contentsCss : CKEDITOR.basePath + 'contents.css',
\r
93 * The writting direction of the language used to write the editor
\r
94 * contents. Allowed values are:
\r
96 * <li>'ui' - which indicate content direction will be the same with the user interface language direction;</li>
\r
97 * <li>'ltr' - for Left-To-Right language (like English);</li>
\r
98 * <li>'rtl' - for Right-To-Left languages (like Arabic).</li>
\r
103 * config.contentsLangDirection = 'rtl';
\r
105 contentsLangDirection : 'ui',
\r
108 * Language code of the writting language which is used to author the editor
\r
110 * @default Same value with editor's UI language.
\r
113 * config.contentsLanguage = 'fr';
\r
115 contentsLanguage : '',
\r
118 * The user interface language localization to use. If empty, the editor
\r
119 * automatically localize the editor to the user language, if supported,
\r
120 * otherwise the {@link CKEDITOR.config.defaultLanguage} language is used.
\r
121 * @default '' (empty)
\r
124 * // Load the German interface.
\r
125 * config.language = 'de';
\r
130 * The language to be used if {@link CKEDITOR.config.language} is left empty and it's not
\r
131 * possible to localize the editor to the user language.
\r
135 * config.defaultLanguage = 'it';
\r
137 defaultLanguage : 'en',
\r
140 * Sets the behavior for the ENTER key. It also dictates other behaviour
\r
141 * rules in the editor, like whether the <br> element is to be used
\r
142 * as a paragraph separator when indenting text.
\r
143 * The allowed values are the following constants, and their relative
\r
146 * <li>{@link CKEDITOR.ENTER_P} (1): new <p> paragraphs are created;</li>
\r
147 * <li>{@link CKEDITOR.ENTER_BR} (2): lines are broken with <br> elements;</li>
\r
148 * <li>{@link CKEDITOR.ENTER_DIV} (3): new <div> blocks are created.</li>
\r
150 * <strong>Note</strong>: It's recommended to use the
\r
151 * {@link CKEDITOR.ENTER_P} value because of its semantic value and
\r
152 * correctness. The editor is optimized for this value.
\r
154 * @default {@link CKEDITOR.ENTER_P}
\r
156 * // Not recommended.
\r
157 * config.enterMode = CKEDITOR.ENTER_BR;
\r
159 enterMode : CKEDITOR.ENTER_P,
\r
162 * Force the respect of {@link CKEDITOR.config.enterMode} as line break regardless of the context,
\r
163 * E.g. If {@link CKEDITOR.config.enterMode} is set to {@link CKEDITOR.ENTER_P},
\r
164 * press enter key inside a 'div' will create a new paragraph with 'p' instead of 'div'.
\r
168 * // Not recommended.
\r
169 * config.forceEnterMode = true;
\r
171 forceEnterMode : false,
\r
174 * Just like the {@link CKEDITOR.config.enterMode} setting, it defines the behavior for the SHIFT+ENTER key.
\r
175 * The allowed values are the following constants, and their relative
\r
178 * <li>{@link CKEDITOR.ENTER_P} (1): new <p> paragraphs are created;</li>
\r
179 * <li>{@link CKEDITOR.ENTER_BR} (2): lines are broken with <br> elements;</li>
\r
180 * <li>{@link CKEDITOR.ENTER_DIV} (3): new <div> blocks are created.</li>
\r
183 * @default {@link CKEDITOR.ENTER_BR}
\r
185 * config.shiftEnterMode = CKEDITOR.ENTER_P;
\r
187 shiftEnterMode : CKEDITOR.ENTER_BR,
\r
190 * A comma separated list of plugins that are not related to editor
\r
191 * instances. Reserved to plugins that extend the core code only.<br /><br />
\r
193 * There are no ways to override this setting, except by editing the source
\r
194 * code of CKEditor (_source/core/config.js).
\r
201 * Sets the doctype to be used when loading the editor content as HTML.
\r
203 * @default '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
\r
205 * // Set the doctype to the HTML 4 (quirks) mode.
\r
206 * config.docType = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
\r
208 docType : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
\r
211 * Sets the "id" attribute to be used on the body element of the editing
\r
212 * area. This can be useful when reusing the original CSS file you're using
\r
213 * on your live website and you want to assing to the editor the same id
\r
214 * you're using for the region that'll hold the contents. In this way,
\r
215 * id specific CSS rules will be enabled.
\r
218 * @default '' (empty)
\r
220 * config.bodyId = 'contents_id';
\r
225 * Sets the "class" attribute to be used on the body element of the editing
\r
226 * area. This can be useful when reusing the original CSS file you're using
\r
227 * on your live website and you want to assing to the editor the same class
\r
228 * name you're using for the region that'll hold the contents. In this way,
\r
229 * class specific CSS rules will be enabled.
\r
232 * @default '' (empty)
\r
234 * config.bodyClass = 'contents';
\r
239 * Indicates whether the contents to be edited are being inputted as a full
\r
240 * HTML page. A full page includes the <html>, <head> and
\r
241 * <body> tags. The final output will also reflect this setting,
\r
242 * including the <body> contents only if this setting is disabled.
\r
247 * config.fullPage = true;
\r
252 * The height of editing area( content ), in relative or absolute, e.g. 30px, 5em.
\r
253 * Note: Percentage unit is not supported yet. e.g. 30%.
\r
254 * @type Number|String
\r
257 * config.height = 500;
\r
258 * config.height = '25em';
\r
259 * config.height = '300px';
\r
264 * Comma separated list of plugins to load and initialize for an editor
\r
265 * instance. This should be rarely changed, using instead the
\r
266 * {@link CKEDITOR.config.extraPlugins} and
\r
267 * {@link CKEDITOR.config.removePlugins} for customizations.
\r
293 'horizontalrule,' +
\r
294 'htmldataprocessor,' +
\r
331 * List of additional plugins to be loaded. This is a tool setting which
\r
332 * makes it easier to add new plugins, whithout having to touch and
\r
333 * possibly breaking the {@link CKEDITOR.config.plugins} setting.
\r
336 * config.extraPlugins = 'myplugin,anotherplugin';
\r
341 * List of plugins that must not be loaded. This is a tool setting which
\r
342 * makes it easier to avoid loading plugins definied in the
\r
343 * {@link CKEDITOR.config.plugins} setting, whithout having to touch it and
\r
344 * potentially breaking it.
\r
347 * config.removePlugins = 'elementspath,save,font';
\r
349 removePlugins : '',
\r
352 * List of regular expressions to be executed over the input HTML,
\r
353 * indicating HTML source code that matched must <strong>not</strong> present in WYSIWYG mode for editing.
\r
355 * @default [] (empty array)
\r
357 * config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // PHP Code
\r
358 * config.protectedSource.push( /<%[\s\S]*?%>/g ); // ASP Code
\r
359 * config.protectedSource.push( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ); // ASP.Net Code
\r
361 protectedSource : [],
\r
364 * The editor tabindex value.
\r
366 * @default 0 (zero)
\r
368 * config.tabIndex = 1;
\r
373 * The theme to be used to build the UI.
\r
375 * @default 'default'
\r
376 * @see CKEDITOR.config.skin
\r
378 * config.theme = 'default';
\r
383 * The skin to load. It may be the name of the skin folder inside the
\r
384 * editor installation path, or the name and the path separated by a comma.
\r
386 * @default 'default'
\r
388 * config.skin = 'v2';
\r
390 * config.skin = 'myskin,/customstuff/myskin/';
\r
395 * The editor width in CSS size format or pixel integer.
\r
396 * @type String|Number
\r
397 * @default '' (empty)
\r
399 * config.width = 850;
\r
401 * config.width = '75%';
\r
406 * The base Z-index for floating dialogs and popups.
\r
410 * config.baseFloatZIndex = 2000
\r
412 baseFloatZIndex : 10000
\r
416 * Indicates that some of the editor features, like alignment and text
\r
417 * direction, should used the "computed value" of the feature to indicate it's
\r
418 * on/off state, instead of using the "real value".<br />
\r
420 * If enabled, in a left to right written document, the "Left Justify"
\r
421 * alignment button will show as active, even if the aligment style is not
\r
422 * explicitly applied to the current paragraph in the editor.
\r
423 * @name CKEDITOR.config.useComputedState
\r
428 * config.useComputedState = false;
\r
431 // PACKAGER_RENAME( CKEDITOR.config )
\r