2 Copyright (c) 2003-2009, 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
11 CKEDITOR.ENTER_P = 1;
\r
12 CKEDITOR.ENTER_BR = 2;
\r
13 CKEDITOR.ENTER_DIV = 3;
\r
16 * Holds the default configuration settings. Changes to this object are
\r
17 * reflected in all editor instances, if not specificaly specified for those
\r
21 * // All editor created after the following setting will not load custom
\r
22 * // configuration files.
\r
23 * CKEDITOR.config.customConfig = '';
\r
28 * The URL path for the custom configuration file to be loaded. If not
\r
29 * overloaded with inline configurations, it defaults to the "config.js"
\r
30 * file present in the root of the CKEditor installation directory.<br /><br />
\r
32 * CKEditor will recursively load custom configuration files defined inside
\r
33 * other custom configuration files.
\r
35 * @default '<CKEditor folder>/config.js'
\r
37 * // Load a specific configuration file.
\r
38 * CKEDITOR.replace( 'myfiled', { customConfig : '/myconfig.js' } );
\r
40 * // Do not load any custom configuration file.
\r
41 * CKEDITOR.replace( 'myfiled', { customConfig : '' } );
\r
43 customConfig : CKEDITOR.getUrl( 'config.js' ),
\r
46 * Whether the replaced element (usually a textarea) is to be updated
\r
47 * automatically when posting the form containing the editor.
\r
51 * config.autoUpdateElement = true;
\r
53 autoUpdateElement : true,
\r
56 * The base href URL used to resolve relative and absolute URLs in the
\r
59 * @default '' (empty string)
\r
61 * config.baseHref = 'http://www.example.com/path/';
\r
66 * The CSS file(s) to be used to apply style to the contents. It should
\r
67 * reflect the CSS used in the final pages where the contents are to be
\r
69 * @type String|Array
\r
70 * @default '<CKEditor folder>/contents.css'
\r
72 * config.contentsCss = '/css/mysitestyles.css';
\r
73 * config.contentsCss = ['/css/mysitestyles.css', '/css/anotherfile.css'];
\r
75 contentsCss : CKEDITOR.basePath + 'contents.css',
\r
78 * The writting direction of the language used to write the editor
\r
79 * contents. Allowed values are 'ltr' for Left-To-Right language (like
\r
80 * English), or 'rtl' for Right-To-Left languages (like Arabic).
\r
84 * config.contentsLangDirection = 'rtl';
\r
86 contentsLangDirection : 'ltr',
\r
89 * The user interface language localization to use. If empty, the editor
\r
90 * automatically localize the editor to the user language, if supported,
\r
91 * otherwise the {@link CKEDITOR.config.defaultLanguage} language is used.
\r
95 * // Load the German interface.
\r
96 * config.language = 'de';
\r
101 * The language to be used if {@link CKEDITOR.config.language} is left empty and it's not
\r
102 * possible to localize the editor to the user language.
\r
106 * config.defaultLanguage = 'it';
\r
108 defaultLanguage : 'en',
\r
111 * Sets the behavior for the ENTER key. It also dictates other behaviour
\r
112 * rules in the editor, like whether the <br> element is to be used
\r
113 * as a paragraph separator when indenting text.
\r
114 * The allowed values are the following constants, and their relative
\r
117 * <li>{@link CKEDITOR.ENTER_P} (1): new <p> paragraphs are created;</li>
\r
118 * <li>{@link CKEDITOR.ENTER_BR} (2): lines are broken with <br> elements;</li>
\r
119 * <li>{@link CKEDITOR.ENTER_DIV} (3): new <div> blocks are created.</li>
\r
121 * <strong>Note</strong>: It's recommended to use the
\r
122 * {@link CKEDITOR.ENTER_P} value because of its semantic value and
\r
123 * correctness. The editor is optimized for this value.
\r
125 * @default {@link CKEDITOR.ENTER_P}
\r
127 * // Not recommended.
\r
128 * config.enterMode = CKEDITOR.ENTER_BR;
\r
130 enterMode : CKEDITOR.ENTER_P,
\r
133 * Just like the {@link CKEDITOR.config.enterMode} setting, it defines the behavior for the SHIFT+ENTER key.
\r
134 * The allowed values are the following constants, and their relative
\r
137 * <li>{@link CKEDITOR.ENTER_P} (1): new <p> paragraphs are created;</li>
\r
138 * <li>{@link CKEDITOR.ENTER_BR} (2): lines are broken with <br> elements;</li>
\r
139 * <li>{@link CKEDITOR.ENTER_DIV} (3): new <div> blocks are created.</li>
\r
142 * @default {@link CKEDITOR.ENTER_BR}
\r
144 * config.shiftEnterMode = CKEDITOR.ENTER_P;
\r
146 shiftEnterMode : CKEDITOR.ENTER_BR,
\r
149 * A comma separated list of plugins that are not related to editor
\r
150 * instances. Reserved to plugins that extend the core code only.<br /><br />
\r
152 * There are no ways to override this setting, except by editing the source
\r
153 * code of CKEditor (_source/core/config.js).
\r
160 * Sets the doctype to be used when loading the editor content as HTML.
\r
162 * @default '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
\r
164 * // Set the doctype to the HTML 4 (quirks) mode.
\r
165 * config.docType = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
\r
167 docType : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
\r
170 * Indicates whether the contents to be edited are being inputted as a full
\r
171 * HTML page. A full page includes the <html>, <head> and
\r
172 * <body> tags. The final output will also reflect this setting,
\r
173 * including the <body> contents only if this setting is disabled.
\r
177 * config.fullPage = true;
\r
182 * The height of editing area( content ), in relative or absolute, e.g. 30px, 5em.
\r
183 * Note: Percentage unit is not supported yet. e.g. 30%.
\r
184 * @type Number|String
\r
187 * config.height = 500;
\r
188 * config.height = '25em';
\r
189 * config.height = '300px';
\r
194 * Comma separated list of plugins to load and initialize for an editor
\r
195 * instance. This should be rarely changed, using instead the
\r
196 * {@link CKEDITOR.config.extraPlugins} and
\r
197 * {@link CKEDITOR.config.removePlugins} for customizations.
\r
201 plugins : 'about,basicstyles,blockquote,button,clipboard,colorbutton,colordialog,contextmenu,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,maximize,newpage,pagebreak,pastefromword,pastetext,popup,preview,print,removeformat,resize,save,scayt,smiley,showblocks,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc',
\r
204 * List of additional plugins to be loaded. This is a tool setting which
\r
205 * makes it easier to add new plugins, whithout having to touch and
\r
206 * possibly breaking the {@link CKEDITOR.config.plugins} setting.
\r
209 * config.extraPlugins = 'myplugin,anotherplugin';
\r
214 * List of plugins that must not be loaded. This is a tool setting which
\r
215 * makes it easier to avoid loading plugins definied in the
\r
216 * {@link CKEDITOR.config.plugins} setting, whithout having to touch it and
\r
217 * potentially breaking it.
\r
220 * config.removePlugins = 'elementspath,save,font';
\r
222 removePlugins : '',
\r
225 * List of regular expressions to be executed over the input HTML,
\r
226 * indicating code that must stay untouched.
\r
228 * @default [] (empty array)
\r
230 * config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // PHP Code
\r
231 * config.protectedSource.push( /<%[\s\S]*?%>/g ); // ASP Code
\r
232 * config.protectedSource.push( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ); // ASP.Net Code
\r
234 protectedSource : [],
\r
237 * The editor tabindex value.
\r
239 * @default 0 (zero)
\r
241 * config.tabIndex = 1;
\r
246 * The theme to be used to build the UI.
\r
248 * @default 'default'
\r
249 * @see CKEDITOR.config.skin
\r
251 * config.theme = 'default';
\r
256 * The skin to load. It may be the name of the skin folder inside the
\r
257 * editor installation path, or the name and the path separated by a comma.
\r
259 * @default 'default'
\r
261 * config.skin = 'v2';
\r
263 * config.skin = 'myskin,/customstuff/myskin/';
\r
268 * The editor width in CSS size format or pixel integer.
\r
269 * @type String|Number
\r
270 * @default '' (empty)
\r
272 * config.width = 850;
\r
274 * config.width = '75%';
\r
279 * The base Z-index for floating dialogs and popups.
\r
283 * config.baseFloatZIndex = 2000
\r
285 baseFloatZIndex : 10000
\r
289 // PACKAGER_RENAME( CKEDITOR.config )
\r