source: trunk/phpgwapi/js/ckeditor/_source/core/config.js @ 2862

Revision 2862, 10.2 KB checked in by rodsouza, 14 years ago (diff)

Ticket #663 - Atualizando e centralizando o CKEditor (v. 3.2.1)

Line 
1/*
2Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
3For licensing, see LICENSE.html or http://ckeditor.com/license
4*/
5
6/**
7 * @fileOverview Defines the {@link CKEDITOR.config} object, which holds the
8 * default configuration settings.
9 */
10
11CKEDITOR.ENTER_P        = 1;
12CKEDITOR.ENTER_BR       = 2;
13CKEDITOR.ENTER_DIV      = 3;
14
15/**
16 * Holds the default configuration settings. Changes to this object are
17 * reflected in all editor instances, if not specificaly specified for those
18 * instances.
19 * @namespace
20 * @example
21 * // All editor created after the following setting will not load custom
22 * // configuration files.
23 * CKEDITOR.config.customConfig = '';
24 */
25CKEDITOR.config =
26{
27        /**
28         * The URL path for the custom configuration file to be loaded. If not
29         * overloaded with inline configurations, it defaults to the "config.js"
30         * file present in the root of the CKEditor installation directory.<br /><br />
31         *
32         * CKEditor will recursively load custom configuration files defined inside
33         * other custom configuration files.
34         * @type String
35         * @default '&lt;CKEditor folder&gt;/config.js'
36         * @example
37         * // Load a specific configuration file.
38         * CKEDITOR.replace( 'myfiled', { customConfig : '/myconfig.js' } );
39         * @example
40         * // Do not load any custom configuration file.
41         * CKEDITOR.replace( 'myfiled', { customConfig : '' } );
42         */
43        customConfig : 'config.js',
44
45        /**
46         * Whether the replaced element (usually a textarea) is to be updated
47         * automatically when posting the form containing the editor.
48         * @type Boolean
49         * @default true
50         * @example
51         * config.autoUpdateElement = true;
52         */
53        autoUpdateElement : true,
54
55        /**
56         * The base href URL used to resolve relative and absolute URLs in the
57         * editor content.
58         * @type String
59         * @default '' (empty string)
60         * @example
61         * config.baseHref = 'http://www.example.com/path/';
62         */
63        baseHref : '',
64
65        /**
66         * The CSS file(s) to be used to apply style to the contents. It should
67         * reflect the CSS used in the final pages where the contents are to be
68         * used.
69         * @type String|Array
70         * @default '&lt;CKEditor folder&gt;/contents.css'
71         * @example
72         * config.contentsCss = '/css/mysitestyles.css';
73         * config.contentsCss = ['/css/mysitestyles.css', '/css/anotherfile.css'];
74         */
75        contentsCss : CKEDITOR.basePath + 'contents.css',
76
77        /**
78         * The writting direction of the language used to write the editor
79         * contents. Allowed values are 'ltr' for Left-To-Right language (like
80         * English), or 'rtl' for Right-To-Left languages (like Arabic).
81         * @default 'ltr'
82         * @type String
83         * @example
84         * config.contentsLangDirection = 'rtl';
85         */
86        contentsLangDirection : 'ltr',
87
88        /**
89         * The user interface language localization to use. If empty, the editor
90         * automatically localize the editor to the user language, if supported,
91         * otherwise the {@link CKEDITOR.config.defaultLanguage} language is used.
92         * @default '' (empty)
93         * @type String
94         * @example
95         * // Load the German interface.
96         * config.language = 'de';
97         */
98        language : '',
99
100        /**
101         * The language to be used if {@link CKEDITOR.config.language} is left empty and it's not
102         * possible to localize the editor to the user language.
103         * @default 'en'
104         * @type String
105         * @example
106         * config.defaultLanguage = 'it';
107         */
108        defaultLanguage : 'en',
109
110        /**
111         * Sets the behavior for the ENTER key. It also dictates other behaviour
112         * rules in the editor, like whether the &lt;br&gt; element is to be used
113         * as a paragraph separator when indenting text.
114         * The allowed values are the following constants, and their relative
115         * behavior:
116         * <ul>
117         *     <li>{@link CKEDITOR.ENTER_P} (1): new &lt;p&gt; paragraphs are created;</li>
118         *     <li>{@link CKEDITOR.ENTER_BR} (2): lines are broken with &lt;br&gt; elements;</li>
119         *     <li>{@link CKEDITOR.ENTER_DIV} (3): new &lt;div&gt; blocks are created.</li>
120         * </ul>
121         * <strong>Note</strong>: It's recommended to use the
122         * {@link CKEDITOR.ENTER_P} value because of its semantic value and
123         * correctness. The editor is optimized for this value.
124         * @type Number
125         * @default {@link CKEDITOR.ENTER_P}
126         * @example
127         * // Not recommended.
128         * config.enterMode = CKEDITOR.ENTER_BR;
129         */
130        enterMode : CKEDITOR.ENTER_P,
131
132        /**
133         * Force the respect of {@link CKEDITOR.config.enterMode} as line break regardless of the context,
134         * E.g. If {@link CKEDITOR.config.enterMode} is set to {@link CKEDITOR.ENTER_P},
135         * press enter key inside a 'div' will create a new paragraph with 'p' instead of 'div'.
136         * @since 3.2.1
137         * @default false
138         * @example
139         * // Not recommended.
140         * config.forceEnterMode = true;
141         */
142        forceEnterMode : false,
143
144        /**
145         * Just like the {@link CKEDITOR.config.enterMode} setting, it defines the behavior for the SHIFT+ENTER key.
146         * The allowed values are the following constants, and their relative
147         * behavior:
148         * <ul>
149         *     <li>{@link CKEDITOR.ENTER_P} (1): new &lt;p&gt; paragraphs are created;</li>
150         *     <li>{@link CKEDITOR.ENTER_BR} (2): lines are broken with &lt;br&gt; elements;</li>
151         *     <li>{@link CKEDITOR.ENTER_DIV} (3): new &lt;div&gt; blocks are created.</li>
152         * </ul>
153         * @type Number
154         * @default {@link CKEDITOR.ENTER_BR}
155         * @example
156         * config.shiftEnterMode = CKEDITOR.ENTER_P;
157         */
158        shiftEnterMode : CKEDITOR.ENTER_BR,
159
160        /**
161         * A comma separated list of plugins that are not related to editor
162         * instances. Reserved to plugins that extend the core code only.<br /><br />
163         *
164         * There are no ways to override this setting, except by editing the source
165         * code of CKEditor (_source/core/config.js).
166         * @type String
167         * @example
168         */
169        corePlugins : '',
170
171        /**
172         * Sets the doctype to be used when loading the editor content as HTML.
173         * @type String
174         * @default '&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;'
175         * @example
176         * // Set the doctype to the HTML 4 (quirks) mode.
177         * config.docType = '&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&gt;';
178         */
179        docType : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
180
181        /**
182         * Sets the "id" attribute to be used on the body element of the editing
183         * area.
184         * @since 3.1
185         * @type String
186         * @default ''
187         */
188        bodyId : '',
189
190        /**
191         * Sets the "class" attribute to be used on the body element of the editing
192         * area.
193         * @since 3.1
194         * @type String
195         * @default ''
196         */
197        bodyClass : '',
198
199        /**
200         * Indicates whether the contents to be edited are being inputted as a full
201         * HTML page. A full page includes the &lt;html&gt;, &lt;head&gt; and
202         * &lt;body&gt; tags. The final output will also reflect this setting,
203         * including the &lt;body&gt; contents only if this setting is disabled.
204         * @since 3.1
205         * @type Boolean
206         * @default false
207         * @example
208         * config.fullPage = true;
209         */
210        fullPage : false,
211
212        /**
213         * The height of editing area( content ), in relative or absolute, e.g. 30px, 5em.
214         * Note: Percentage unit is not supported yet. e.g. 30%.
215         * @type Number|String
216         * @default '200'
217         * @example
218         * config.height = 500;
219         * config.height = '25em';
220         * config.height = '300px';
221         */
222        height : 200,
223
224        /**
225         * Comma separated list of plugins to load and initialize for an editor
226         * instance. This should be rarely changed, using instead the
227         * {@link CKEDITOR.config.extraPlugins} and
228         * {@link CKEDITOR.config.removePlugins} for customizations.
229         * @type String
230         * @example
231         */
232        plugins : 'about,a11yhelp,basicstyles,blockquote,button,clipboard,colorbutton,colordialog,contextmenu,div,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,showborders,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc',
233
234        /**
235         * List of additional plugins to be loaded. This is a tool setting which
236         * makes it easier to add new plugins, whithout having to touch and
237         * possibly breaking the {@link CKEDITOR.config.plugins} setting.
238         * @type String
239         * @example
240         * config.extraPlugins = 'myplugin,anotherplugin';
241         */
242        extraPlugins : '',
243
244        /**
245         * List of plugins that must not be loaded. This is a tool setting which
246         * makes it easier to avoid loading plugins definied in the
247         * {@link CKEDITOR.config.plugins} setting, whithout having to touch it and
248         * potentially breaking it.
249         * @type String
250         * @example
251         * config.removePlugins = 'elementspath,save,font';
252         */
253        removePlugins : '',
254
255        /**
256         * List of regular expressions to be executed over the input HTML,
257         * indicating code that must stay untouched.
258         * @type Array
259         * @default [] (empty array)
260         * @example
261         * config.protectedSource.push( /<\?[\s\S]*?\?>/g );   // PHP Code
262         * config.protectedSource.push( /<%[\s\S]*?%>/g );   // ASP Code
263         * config.protectedSource.push( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi );   // ASP.Net Code
264         */
265        protectedSource : [],
266
267        /**
268         * The editor tabindex value.
269         * @type Number
270         * @default 0 (zero)
271         * @example
272         * config.tabIndex = 1;
273         */
274        tabIndex : 0,
275
276        /**
277         * The theme to be used to build the UI.
278         * @type String
279         * @default 'default'
280         * @see CKEDITOR.config.skin
281         * @example
282         * config.theme = 'default';
283         */
284        theme : 'default',
285
286        /**
287         * The skin to load. It may be the name of the skin folder inside the
288         * editor installation path, or the name and the path separated by a comma.
289         * @type String
290         * @default 'default'
291         * @example
292         * config.skin = 'v2';
293         * @example
294         * config.skin = 'myskin,/customstuff/myskin/';
295         */
296        skin : 'kama',
297
298        /**
299         * The editor width in CSS size format or pixel integer.
300         * @type String|Number
301         * @default '' (empty)
302         * @example
303         * config.width = 850;
304         * @example
305         * config.width = '75%';
306         */
307        width : '',
308
309        /**
310         * The base Z-index for floating dialogs and popups.
311         * @type Number
312         * @default 10000
313         * @example
314         * config.baseFloatZIndex = 2000
315         */
316        baseFloatZIndex : 10000
317};
318
319// PACKAGER_RENAME( CKEDITOR.config )
Note: See TracBrowser for help on using the repository browser.