2 Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3 For licensing, see LICENSE.html or http://ckeditor.com/license
7 * @fileOverview Defines the <code>{@link CKEDITOR.config}</code> object that stores the
8 * default configuration settings.
12 * Used in conjunction with <code>{@link CKEDITOR.config.enterMode}</code>
13 * and <code>{@link CKEDITOR.config.shiftEnterMode}</code> configuration
14 * settings to make the editor produce <code><p></code> tags when
15 * using the <em>Enter</em> key.
21 * Used in conjunction with <code>{@link CKEDITOR.config.enterMode}</code>
22 * and <code>{@link CKEDITOR.config.shiftEnterMode}</code> configuration
23 * settings to make the editor produce <code><br></code> tags when
24 * using the <em>Enter</em> key.
27 CKEDITOR.ENTER_BR = 2;
30 * Used in conjunction with <code>{@link CKEDITOR.config.enterMode}</code>
31 * and <code>{@link CKEDITOR.config.shiftEnterMode}</code> configuration
32 * settings to make the editor produce <code><div></code> tags when
33 * using the <em>Enter</em> key.
36 CKEDITOR.ENTER_DIV = 3;
39 * @namespace Stores default configuration settings. Changes to this object are
40 * reflected in all editor instances, if not specified otherwise for a particular
46 * The URL path for the custom configuration file to be loaded. If not
47 * overloaded with inline configuration, it defaults to the <code>config.js</code>
48 * file present in the root of the CKEditor installation directory.<br /><br />
50 * CKEditor will recursively load custom configuration files defined inside
51 * other custom configuration files.
53 * @default <code>'<em><CKEditor folder></em>/config.js'</code>
55 * // Load a specific configuration file.
56 * CKEDITOR.replace( 'myfield', { customConfig : '/myconfig.js' } );
58 * // Do not load any custom configuration file.
59 * CKEDITOR.replace( 'myfield', { customConfig : '' } );
61 customConfig : 'config.js',
64 * Whether the replaced element (usually a <code><textarea></code>)
65 * is to be updated automatically when posting the form containing the editor.
67 * @default <code>true</code>
69 * config.autoUpdateElement = true;
71 autoUpdateElement : true,
74 * The base href URL used to resolve relative and absolute URLs in the
77 * @default <code>''</code> (empty)
79 * config.baseHref = 'http://www.example.com/path/';
84 * The CSS file(s) to be used to apply style to editor contents. It should
85 * reflect the CSS used in the final pages where the contents are to be
88 * @default <code>'<em><CKEditor folder></em>/contents.css'</code>
90 * config.contentsCss = '/css/mysitestyles.css';
91 * config.contentsCss = ['/css/mysitestyles.css', '/css/anotherfile.css'];
93 contentsCss : CKEDITOR.basePath + 'contents.css',
96 * The writing direction of the language used to create the editor
97 * contents. Allowed values are:
99 * <li><code>'ui'</code> – indicates that content direction will be the same as the user interface language direction;</li>
100 * <li><code>'ltr'</code> – for Left-To-Right language (like English);</li>
101 * <li><code>'rtl'</code> – for Right-To-Left languages (like Arabic).</li>
103 * @default <code>'ui'</code>
106 * config.contentsLangDirection = 'rtl';
108 contentsLangDirection : 'ui',
111 * Language code of the writing language which is used to create the editor
113 * @default Same value as editor UI language.
116 * config.contentsLanguage = 'fr';
118 contentsLanguage : '',
121 * The user interface language localization to use. If left empty, the editor
122 * will automatically be localized to the user language. If the user language is not supported,
123 * the language specified in the <code>{@link CKEDITOR.config.defaultLanguage}</code>
124 * configuration setting is used.
125 * @default <code>''</code> (empty)
128 * // Load the German interface.
129 * config.language = 'de';
134 * The language to be used if the <code>{@link CKEDITOR.config.language}</code>
135 * setting is left empty and it is not possible to localize the editor to the user language.
136 * @default <code>'en'</code>
139 * config.defaultLanguage = 'it';
141 defaultLanguage : 'en',
144 * Sets the behavior of the <em>Enter</em> key. It also determines other behavior
145 * rules of the editor, like whether the <code><br></code> element is to be used
146 * as a paragraph separator when indenting text.
147 * The allowed values are the following constants that cause the behavior outlined below:
149 * <li><code>{@link CKEDITOR.ENTER_P}</code> (1) – new <code><p></code> paragraphs are created;</li>
150 * <li><code>{@link CKEDITOR.ENTER_BR}</code> (2) – lines are broken with <code><br></code> elements;</li>
151 * <li><code>{@link CKEDITOR.ENTER_DIV}</code> (3) – new <code><div></code> blocks are created.</li>
153 * <strong>Note</strong>: It is recommended to use the
154 * <code>{@link CKEDITOR.ENTER_P}</code> setting because of its semantic value and
155 * correctness. The editor is optimized for this setting.
157 * @default <code>{@link CKEDITOR.ENTER_P}</code>
159 * // Not recommended.
160 * config.enterMode = CKEDITOR.ENTER_BR;
162 enterMode : CKEDITOR.ENTER_P,
165 * Force the use of <code>{@link CKEDITOR.config.enterMode}</code> as line break regardless
166 * of the context. If, for example, <code>{@link CKEDITOR.config.enterMode}</code> is set
167 * to <code>{@link CKEDITOR.ENTER_P}</code>, pressing the <em>Enter</em> key inside a
168 * <code><div></code> element will create a new paragraph with <code><p></code>
169 * instead of a <code><div></code>.
172 * @default <code>false</code>
174 * // Not recommended.
175 * config.forceEnterMode = true;
177 forceEnterMode : false,
180 * Similarly to the <code>{@link CKEDITOR.config.enterMode}</code> setting, it defines the behavior
181 * of the <em>Shift+Enter</em> key combination.
182 * The allowed values are the following constants the behavior outlined below:
184 * <li><code>{@link CKEDITOR.ENTER_P}</code> (1) – new <code><p></code> paragraphs are created;</li>
185 * <li><code>{@link CKEDITOR.ENTER_BR}</code> (2) – lines are broken with <code><br></code> elements;</li>
186 * <li><code>{@link CKEDITOR.ENTER_DIV}</code> (3) – new <code><div></code> blocks are created.</li>
189 * @default <code>{@link CKEDITOR.ENTER_BR}</code>
191 * config.shiftEnterMode = CKEDITOR.ENTER_P;
193 shiftEnterMode : CKEDITOR.ENTER_BR,
196 * A comma separated list of plugins that are not related to editor
197 * instances. Reserved for plugins that extend the core code only.<br /><br />
199 * There are no ways to override this setting except by editing the source
200 * code of CKEditor (<code>_source/core/config.js</code>).
207 * Sets the <code>DOCTYPE</code> to be used when loading the editor content as HTML.
209 * @default <code>'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'</code>
211 * // Set the DOCTYPE to the HTML 4 (Quirks) mode.
212 * config.docType = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
214 docType : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
217 * Sets the <code>id</code> attribute to be used on the <code>body</code> element
218 * of the editing area. This can be useful when you intend to reuse the original CSS
219 * file you are using on your live website and want to assign the editor the same ID
220 * as the section that will include the contents. In this way ID-specific CSS rules will
224 * @default <code>''</code> (empty)
226 * config.bodyId = 'contents_id';
231 * Sets the <code>class</code> attribute to be used on the <code>body</code> element
232 * of the editing area. This can be useful when you intend to reuse the original CSS
233 * file you are using on your live website and want to assign the editor the same class
234 * as the section that will include the contents. In this way class-specific CSS rules will
238 * @default <code>''</code> (empty)
240 * config.bodyClass = 'contents';
245 * Indicates whether the contents to be edited are being input as a full
246 * HTML page. A full page includes the <code><html></code>,
247 * <code><head></code>, and <code><body></code> elements.
248 * The final output will also reflect this setting, including the
249 * <code><body></code> contents only if this setting is disabled.
252 * @default <code>false</code>
254 * config.fullPage = true;
259 * The height of the editing area (that includes the editor content),
260 * in relative or absolute units, e.g. <code>30px</code>, <code>5em</code>.
261 * <strong>Note:</strong> Percentage units, like <code>30%</code>, are not supported yet.
262 * @type Number|String
263 * @default <code>'200'</code>
265 * config.height = 500;
266 * config.height = '25em';
267 * config.height = '300px';
272 * Comma separated list of plugins to be loaded and initialized for an editor
273 * instance. This setting should rarely be changed. It is recommended to use the
274 * <code>{@link CKEDITOR.config.extraPlugins}</code> and
275 * <code>{@link CKEDITOR.config.removePlugins}</code> for customization purposes instead.
302 'htmldataprocessor,' +
339 * A list of additional plugins to be loaded. This setting makes it easier
340 * to add new plugins without having to touch and potentially break the
341 * <code>{@link CKEDITOR.config.plugins}</code> setting.
344 * config.extraPlugins = 'myplugin,anotherplugin';
349 * A list of plugins that must not be loaded. This setting makes it possible
350 * to avoid loading some plugins defined in the <code>{@link CKEDITOR.config.plugins}</code>
351 * setting, without having to touch it and potentially break it.
354 * config.removePlugins = 'elementspath,save,font';
359 * List of regular expressions to be executed on input HTML,
360 * indicating HTML source code that when matched, must <strong>not</strong> be available in the WYSIWYG
363 * @default <code>[]</code> (empty array)
365 * config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // PHP code
366 * config.protectedSource.push( /<%[\s\S]*?%>/g ); // ASP code
367 * config.protectedSource.push( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ); // ASP.Net code
369 protectedSource : [],
372 * The editor <code>tabindex</code> value.
374 * @default <code>0</code> (zero)
376 * config.tabIndex = 1;
381 * The theme to be used to build the user interface.
383 * @default <code>'default'</code>
384 * @see CKEDITOR.config.skin
386 * config.theme = 'default';
391 * The skin to load. It may be the name of the skin folder inside the
392 * editor installation path, or the name and the path separated by a comma.
394 * @default <code>'default'</code>
396 * config.skin = 'v2';
398 * config.skin = 'myskin,/customstuff/myskin/';
403 * The editor width in CSS-defined units or an integer denoting a value in pixels.
404 * @type String|Number
405 * @default <code>''</code> (empty)
407 * config.width = 850;
409 * config.width = '75%';
414 * The base Z-index for floating dialog windows and popups.
416 * @default <code>10000</code>
418 * config.baseFloatZIndex = 2000
420 baseFloatZIndex : 10000
424 * Indicates that some of the editor features, like alignment and text
425 * direction, should use the "computed value" of the feature to indicate its
426 * on/off state instead of using the "real value".<br />
428 * If enabled in a Left-To-Right written document, the "Left Justify"
429 * alignment button will be shown as active, even if the alignment style is not
430 * explicitly applied to the current paragraph in the editor.
431 * @name CKEDITOR.config.useComputedState
433 * @default <code>true</code>
436 * config.useComputedState = false;
439 // PACKAGER_RENAME( CKEDITOR.config )