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