source: trunk/admin/inc/ckeditor/_source/core/config.js@ 239

Last change on this file since 239 was 239, checked in by luc, 9 years ago

Admin: correzione visulaizzazione immissione dati spoglio per Chrome e Safari - Aggiornamento dell'editor da FCKeditor a CKeditor , accessibili anche a Chrome e Safari.

  • Property svn:executable set to *
File size: 14.3 KB
Line 
1/*
2Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3For licensing, see LICENSE.html or http://ckeditor.com/license
4*/
5
6/**
7 * @fileOverview Defines the <code>{@link CKEDITOR.config}</code> object that stores the
8 * default configuration settings.
9 */
10
11/**
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>&lt;p&gt;</code> tags when
15 * using the <em>Enter</em> key.
16 * @constant
17 */
18CKEDITOR.ENTER_P = 1;
19
20/**
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>&lt;br&gt;</code> tags when
24 * using the <em>Enter</em> key.
25 * @constant
26 */
27CKEDITOR.ENTER_BR = 2;
28
29/**
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>&lt;div&gt;</code> tags when
33 * using the <em>Enter</em> key.
34 * @constant
35 */
36CKEDITOR.ENTER_DIV = 3;
37
38/**
39 * @namespace Stores default configuration settings. Changes to this object are
40 * reflected in all editor instances, if not specified otherwise for a particular
41 * instance.
42 */
43CKEDITOR.config =
44{
45 /**
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 />
49 *
50 * CKEditor will recursively load custom configuration files defined inside
51 * other custom configuration files.
52 * @type String
53 * @default <code>'<em>&lt;CKEditor folder&gt;</em>/config.js'</code>
54 * @example
55 * // Load a specific configuration file.
56 * CKEDITOR.replace( 'myfield', { customConfig : '/myconfig.js' } );
57 * @example
58 * // Do not load any custom configuration file.
59 * CKEDITOR.replace( 'myfield', { customConfig : '' } );
60 */
61 customConfig : 'config.js',
62
63 /**
64 * Whether the replaced element (usually a <code>&lt;textarea&gt;</code>)
65 * is to be updated automatically when posting the form containing the editor.
66 * @type Boolean
67 * @default <code>true</code>
68 * @example
69 * config.autoUpdateElement = true;
70 */
71 autoUpdateElement : true,
72
73 /**
74 * The base href URL used to resolve relative and absolute URLs in the
75 * editor content.
76 * @type String
77 * @default <code>''</code> (empty)
78 * @example
79 * config.baseHref = 'http://www.example.com/path/';
80 */
81 baseHref : '',
82
83 /**
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
86 * used.
87 * @type String|Array
88 * @default <code>'<em>&lt;CKEditor folder&gt;</em>/contents.css'</code>
89 * @example
90 * config.contentsCss = '/css/mysitestyles.css';
91 * config.contentsCss = ['/css/mysitestyles.css', '/css/anotherfile.css'];
92 */
93 contentsCss : CKEDITOR.basePath + 'contents.css',
94
95 /**
96 * The writing direction of the language used to create the editor
97 * contents. Allowed values are:
98 * <ul>
99 * <li><code>'ui'</code> &ndash; indicates that content direction will be the same as the user interface language direction;</li>
100 * <li><code>'ltr'</code> &ndash; for Left-To-Right language (like English);</li>
101 * <li><code>'rtl'</code> &ndash; for Right-To-Left languages (like Arabic).</li>
102 * </ul>
103 * @default <code>'ui'</code>
104 * @type String
105 * @example
106 * config.contentsLangDirection = 'rtl';
107 */
108 contentsLangDirection : 'ui',
109
110 /**
111 * Language code of the writing language which is used to create the editor
112 * contents.
113 * @default Same value as editor UI language.
114 * @type String
115 * @example
116 * config.contentsLanguage = 'fr';
117 */
118 contentsLanguage : '',
119
120 /**
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)
126 * @type String
127 * @example
128 * // Load the German interface.
129 * config.language = 'de';
130 */
131 language : '',
132
133 /**
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>
137 * @type String
138 * @example
139 * config.defaultLanguage = 'it';
140 */
141 defaultLanguage : 'en',
142
143 /**
144 * Sets the behavior of the <em>Enter</em> key. It also determines other behavior
145 * rules of the editor, like whether the <code>&lt;br&gt;</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:
148 * <ul>
149 * <li><code>{@link CKEDITOR.ENTER_P}</code> (1) &ndash; new <code>&lt;p&gt;</code> paragraphs are created;</li>
150 * <li><code>{@link CKEDITOR.ENTER_BR}</code> (2) &ndash; lines are broken with <code>&lt;br&gt;</code> elements;</li>
151 * <li><code>{@link CKEDITOR.ENTER_DIV}</code> (3) &ndash; new <code>&lt;div&gt;</code> blocks are created.</li>
152 * </ul>
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.
156 * @type Number
157 * @default <code>{@link CKEDITOR.ENTER_P}</code>
158 * @example
159 * // Not recommended.
160 * config.enterMode = CKEDITOR.ENTER_BR;
161 */
162 enterMode : CKEDITOR.ENTER_P,
163
164 /**
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>&lt;div&gt;</code> element will create a new paragraph with <code>&lt;p&gt;</code>
169 * instead of a <code>&lt;div&gt;</code>.
170 * @since 3.2.1
171 * @type Boolean
172 * @default <code>false</code>
173 * @example
174 * // Not recommended.
175 * config.forceEnterMode = true;
176 */
177 forceEnterMode : false,
178
179 /**
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:
183 * <ul>
184 * <li><code>{@link CKEDITOR.ENTER_P}</code> (1) &ndash; new <code>&lt;p&gt;</code> paragraphs are created;</li>
185 * <li><code>{@link CKEDITOR.ENTER_BR}</code> (2) &ndash; lines are broken with <code>&lt;br&gt;</code> elements;</li>
186 * <li><code>{@link CKEDITOR.ENTER_DIV}</code> (3) &ndash; new <code>&lt;div&gt;</code> blocks are created.</li>
187 * </ul>
188 * @type Number
189 * @default <code>{@link CKEDITOR.ENTER_BR}</code>
190 * @example
191 * config.shiftEnterMode = CKEDITOR.ENTER_P;
192 */
193 shiftEnterMode : CKEDITOR.ENTER_BR,
194
195 /**
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 />
198 *
199 * There are no ways to override this setting except by editing the source
200 * code of CKEditor (<code>_source/core/config.js</code>).
201 * @type String
202 * @example
203 */
204 corePlugins : '',
205
206 /**
207 * Sets the <code>DOCTYPE</code> to be used when loading the editor content as HTML.
208 * @type String
209 * @default <code>'&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;'</code>
210 * @example
211 * // Set the DOCTYPE to the HTML 4 (Quirks) mode.
212 * config.docType = '&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&gt;';
213 */
214 docType : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
215
216 /**
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
221 * be enabled.
222 * @since 3.1
223 * @type String
224 * @default <code>''</code> (empty)
225 * @example
226 * config.bodyId = 'contents_id';
227 */
228 bodyId : '',
229
230 /**
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
235 * be enabled.
236 * @since 3.1
237 * @type String
238 * @default <code>''</code> (empty)
239 * @example
240 * config.bodyClass = 'contents';
241 */
242 bodyClass : '',
243
244 /**
245 * Indicates whether the contents to be edited are being input as a full
246 * HTML page. A full page includes the <code>&lt;html&gt;</code>,
247 * <code>&lt;head&gt;</code>, and <code>&lt;body&gt;</code> elements.
248 * The final output will also reflect this setting, including the
249 * <code>&lt;body&gt;</code> contents only if this setting is disabled.
250 * @since 3.1
251 * @type Boolean
252 * @default <code>false</code>
253 * @example
254 * config.fullPage = true;
255 */
256 fullPage : false,
257
258 /**
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>
264 * @example
265 * config.height = 500;
266 * config.height = '25em';
267 * config.height = '300px';
268 */
269 height : 200,
270
271 /**
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.
276 * @type String
277 * @example
278 */
279 plugins :
280 'about,' +
281 'a11yhelp,' +
282 'basicstyles,' +
283 'bidi,' +
284 'blockquote,' +
285 'button,' +
286 'clipboard,' +
287 'colorbutton,' +
288 'colordialog,' +
289 'contextmenu,' +
290 'dialogadvtab,' +
291 'div,' +
292 'elementspath,' +
293 'enterkey,' +
294 'entities,' +
295 'filebrowser,' +
296 'find,' +
297 'flash,' +
298 'font,' +
299 'format,' +
300 'forms,' +
301 'horizontalrule,' +
302 'htmldataprocessor,' +
303 'iframe,' +
304 'image,' +
305 'indent,' +
306 'justify,' +
307 'keystrokes,' +
308 'link,' +
309 'list,' +
310 'liststyle,' +
311 'maximize,' +
312 'newpage,' +
313 'pagebreak,' +
314 'pastefromword,' +
315 'pastetext,' +
316 'popup,' +
317 'preview,' +
318 'print,' +
319 'removeformat,' +
320 'resize,' +
321 'save,' +
322 'scayt,' +
323 'smiley,' +
324 'showblocks,' +
325 'showborders,' +
326 'sourcearea,' +
327 'stylescombo,' +
328 'table,' +
329 'tabletools,' +
330 'specialchar,' +
331 'tab,' +
332 'templates,' +
333 'toolbar,' +
334 'undo,' +
335 'wysiwygarea,' +
336 'wsc',
337
338 /**
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.
342 * @type String
343 * @example
344 * config.extraPlugins = 'myplugin,anotherplugin';
345 */
346 extraPlugins : '',
347
348 /**
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.
352 * @type String
353 * @example
354 * config.removePlugins = 'elementspath,save,font';
355 */
356 removePlugins : '',
357
358 /**
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
361 * mode for editing.
362 * @type Array
363 * @default <code>[]</code> (empty array)
364 * @example
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
368 */
369 protectedSource : [],
370
371 /**
372 * The editor <code>tabindex</code> value.
373 * @type Number
374 * @default <code>0</code> (zero)
375 * @example
376 * config.tabIndex = 1;
377 */
378 tabIndex : 0,
379
380 /**
381 * The theme to be used to build the user interface.
382 * @type String
383 * @default <code>'default'</code>
384 * @see CKEDITOR.config.skin
385 * @example
386 * config.theme = 'default';
387 */
388 theme : 'default',
389
390 /**
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.
393 * @type String
394 * @default <code>'default'</code>
395 * @example
396 * config.skin = 'v2';
397 * @example
398 * config.skin = 'myskin,/customstuff/myskin/';
399 */
400 skin : 'kama',
401
402 /**
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)
406 * @example
407 * config.width = 850;
408 * @example
409 * config.width = '75%';
410 */
411 width : '',
412
413 /**
414 * The base Z-index for floating dialog windows and popups.
415 * @type Number
416 * @default <code>10000</code>
417 * @example
418 * config.baseFloatZIndex = 2000
419 */
420 baseFloatZIndex : 10000
421};
422
423/**
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 />
427 * <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
432 * @type Boolean
433 * @default <code>true</code>
434 * @since 3.4
435 * @example
436 * config.useComputedState = false;
437 */
438
439// PACKAGER_RENAME( CKEDITOR.config )
Note: See TracBrowser for help on using the repository browser.