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