JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.0
[ckeditor.git] / _source / core / config.js
diff --git a/_source/core/config.js b/_source/core/config.js
new file mode 100644 (file)
index 0000000..caa8d53
--- /dev/null
@@ -0,0 +1,287 @@
+/*\r
+Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
+For licensing, see LICENSE.html or http://ckeditor.com/license\r
+*/\r
+\r
+/**\r
+ * @fileOverview Defines the {@link CKEDITOR.config} object, which holds the\r
+ * default configuration settings.\r
+ */\r
+\r
+CKEDITOR.ENTER_P       = 1;\r
+CKEDITOR.ENTER_BR      = 2;\r
+CKEDITOR.ENTER_DIV     = 3;\r
+\r
+/**\r
+ * Holds the default configuration settings. Changes to this object are\r
+ * reflected in all editor instances, if not specificaly specified for those\r
+ * instances.\r
+ * @namespace\r
+ * @example\r
+ * // All editor created after the following setting will not load custom\r
+ * // configuration files.\r
+ * CKEDITOR.config.customConfig = '';\r
+ */\r
+CKEDITOR.config =\r
+{\r
+       /**\r
+        * The URL path for the custom configuration file to be loaded. If not\r
+        * overloaded with inline configurations, it defaults to the "config.js"\r
+        * file present in the root of the CKEditor installation directory.<br /><br />\r
+        *\r
+        * CKEditor will recursively load custom configuration files defined inside\r
+        * other custom configuration files.\r
+        * @type String\r
+        * @default '&lt;CKEditor folder&gt;/config.js'\r
+        * @example\r
+        * // Load a specific configuration file.\r
+        * CKEDITOR.replace( 'myfiled', { customConfig : '/myconfig.js' } );\r
+        * @example\r
+        * // Do not load any custom configuration file.\r
+        * CKEDITOR.replace( 'myfiled', { customConfig : '' } );\r
+        */\r
+       customConfig : CKEDITOR.getUrl( 'config.js' ),\r
+\r
+       /**\r
+        * Whether the replaced element (usually a textarea) is to be updated\r
+        * automatically when posting the form containing the editor.\r
+        * @type Boolean\r
+        * @default true\r
+        * @example\r
+        * config.autoUpdateElement = true;\r
+        */\r
+       autoUpdateElement : true,\r
+\r
+       /**\r
+        * The base href URL used to resolve relative and absolute URLs in the\r
+        * editor content.\r
+        * @type String\r
+        * @default '' (empty string)\r
+        * @example\r
+        * config.baseHref = 'http://www.example.com/path/';\r
+        */\r
+       baseHref : '',\r
+\r
+       /**\r
+        * The CSS file to be used to apply style to the contents. It should\r
+        * reflect the CSS used in the final pages where the contents are to be\r
+        * used.\r
+        * @type String\r
+        * @default '&lt;CKEditor folder&gt;/contents.css'\r
+        * @example\r
+        * config.contentsCss = '/css/mysitestyles.css';\r
+        */\r
+       contentsCss : CKEDITOR.basePath + 'contents.css',\r
+\r
+       /**\r
+        * The writting direction of the language used to write the editor\r
+        * contents. Allowed values are 'ltr' for Left-To-Right language (like\r
+        * English), or 'rtl' for Right-To-Left languages (like Arabic).\r
+        * @default 'ltr'\r
+        * @type String\r
+        * @example\r
+        * config.contentsLangDirection = 'rtl';\r
+        */\r
+       contentsLangDirection : 'ltr',\r
+\r
+       /**\r
+        * The user interface language localization to use. If empty, the editor\r
+        * automatically localize the editor to the user language, if supported,\r
+        * otherwise the {@link CKEDITOR.config.defaultLanguage} language is used.\r
+        * @default true\r
+        * @type Boolean\r
+        * @example\r
+        * // Load the German interface.\r
+        * config.language = 'de';\r
+        */\r
+       language : '',\r
+\r
+       /**\r
+        * The language to be used if {@link CKEDITOR.config.language} is left empty and it's not\r
+        * possible to localize the editor to the user language.\r
+        * @default 'en'\r
+        * @type String\r
+        * @example\r
+        * config.defaultLanguage = 'it';\r
+        */\r
+       defaultLanguage : 'en',\r
+\r
+       /**\r
+        * Sets the behavior for the ENTER key. It also dictates other behaviour\r
+        * rules in the editor, like whether the &lt;br&gt; element is to be used\r
+        * as a paragraph separator when indenting text.\r
+        * The allowed values are the following constants, and their relative\r
+        * behavior:\r
+        * <ul>\r
+        *     <li>{@link CKEDITOR.ENTER_P} (1): new &lt;p&gt; paragraphs are created;</li>\r
+        *     <li>{@link CKEDITOR.ENTER_BR} (2): lines are broken with &lt;br&gt; elements;</li>\r
+        *     <li>{@link CKEDITOR.ENTER_DIV} (3): new &lt;div&gt; blocks are created.</li>\r
+        * </ul>\r
+        * <strong>Note</strong>: It's recommended to use the\r
+        * {@link CKEDITOR.ENTER_P} value because of its semantic value and\r
+        * correctness. The editor is optimized for this value.\r
+        * @type Number\r
+        * @default {@link CKEDITOR.ENTER_P}\r
+        * @example\r
+        * // Not recommended.\r
+        * config.enterMode = CKEDITOR.ENTER_BR;\r
+        */\r
+       enterMode : CKEDITOR.ENTER_P,\r
+\r
+       /**\r
+        * Just like the {@link CKEDITOR.config.enterMode} setting, it defines the behavior for the SHIFT+ENTER key.\r
+        * The allowed values are the following constants, and their relative\r
+        * behavior:\r
+        * <ul>\r
+        *     <li>{@link CKEDITOR.ENTER_P} (1): new &lt;p&gt; paragraphs are created;</li>\r
+        *     <li>{@link CKEDITOR.ENTER_BR} (2): lines are broken with &lt;br&gt; elements;</li>\r
+        *     <li>{@link CKEDITOR.ENTER_DIV} (3): new &lt;div&gt; blocks are created.</li>\r
+        * </ul>\r
+        * @type Number\r
+        * @default {@link CKEDITOR.ENTER_BR}\r
+        * @example\r
+        * config.shiftEnterMode = CKEDITOR.ENTER_P;\r
+        */\r
+       shiftEnterMode : CKEDITOR.ENTER_BR,\r
+\r
+       /**\r
+        * A comma separated list of plugins that are not related to editor\r
+        * instances. Reserved to plugins that extend the core code only.<br /><br />\r
+        *\r
+        * There are no ways to override this setting, except by editing the source\r
+        * code of CKEditor (_source/core/config.js).\r
+        * @type String\r
+        * @example\r
+        */\r
+       corePlugins : '',\r
+\r
+       /**\r
+        * Sets the doctype to be used when loading the editor content as HTML.\r
+        * @type String\r
+        * @default '&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;'\r
+        * @example\r
+        * // Set the doctype to the HTML 4 (quirks) mode.\r
+        * config.docType = '&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&gt;';\r
+        */\r
+       docType : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',\r
+\r
+       /**\r
+        * Indicates whether the contents to be edited are being inputted as a full\r
+        * HTML page. A full page includes the &lt;html&gt;, &lt;head&gt; and\r
+        * &lt;body&gt; tags. The final output will also reflect this setting,\r
+        * including the &lt;body&gt; contents only if this setting is disabled.\r
+        * @type Boolean\r
+        * @default false\r
+        * @example\r
+        * config.fullPage = true;\r
+        */\r
+       fullPage : false,\r
+\r
+       /**\r
+        * The editor height, in CSS size format or pixel integer.\r
+        * @type Number|String\r
+        * @default '200'\r
+        * @example\r
+        * config.height = 500;\r
+        * @example\r
+        * config.height = '25em';\r
+        */\r
+       height : 200,\r
+\r
+       /**\r
+        * Comma separated list of plugins to load and initialize for an editor\r
+        * instance. This should be rarely changed, using instead the\r
+        * {@link CKEDITOR.config.extraPlugins} and\r
+        * {@link CKEDITOR.config.removePlugins} for customizations.\r
+        * @type String\r
+        * @example\r
+        */\r
+       plugins : 'about,basicstyles,blockquote,button,clipboard,colorbutton,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
+\r
+       /**\r
+        * List of additional plugins to be loaded. This is a tool setting which\r
+        * makes it easier to add new plugins, whithout having to touch and\r
+        * possibly breaking the {@link CKEDITOR.config.plugins} setting.\r
+        * @type String\r
+        * @example\r
+        * config.extraPlugins = 'myplugin,anotherplugin';\r
+        */\r
+       extraPlugins : '',\r
+\r
+       /**\r
+        * List of plugins that must not be loaded. This is a tool setting which\r
+        * makes it easier to avoid loading plugins definied in the\r
+        * {@link CKEDITOR.config.plugins} setting, whithout having to touch it and\r
+        * potentially breaking it.\r
+        * @type String\r
+        * @example\r
+        * config.removePlugins = 'elementspath,save,font';\r
+        */\r
+       removePlugins : '',\r
+\r
+       /**\r
+        * List of regular expressions to be executed over the input HTML,\r
+        * indicating code that must stay untouched.\r
+        * @type Array\r
+        * @default [] (empty array)\r
+        * @example\r
+        * config.protectedSource.push( /<\?[\s\S]*?\?>/g );   // PHP Code\r
+        * config.protectedSource.push( /<%[\s\S]*?%>/g );   // ASP Code\r
+        * config.protectedSource.push( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi );   // ASP.Net Code\r
+        */\r
+       protectedSource : [],\r
+\r
+       /**\r
+        * The editor tabindex value.\r
+        * @type Number\r
+        * @default 0 (zero)\r
+        * @example\r
+        * config.tabIndex = 1;\r
+        */\r
+       tabIndex : 0,\r
+\r
+       /**\r
+        * The theme to be used to build the UI.\r
+        * @type String\r
+        * @default 'default'\r
+        * @see CKEDITOR.config.skin\r
+        * @example\r
+        * config.theme = 'default';\r
+        */\r
+       theme : 'default',\r
+\r
+       /**\r
+        * The skin to load. It may be the name of the skin folder inside the\r
+        * editor installation path, or the name and the path separated by a comma.\r
+        * @type String\r
+        * @default 'default'\r
+        * @example\r
+        * config.skin = 'v2';\r
+        * @example\r
+        * config.skin = 'myskin,/customstuff/myskin/';\r
+        */\r
+       skin : 'kama',\r
+\r
+       /**\r
+        * The editor width in CSS size format or pixel integer.\r
+        * @type String|Number\r
+        * @default '' (empty)\r
+        * @example\r
+        * config.width = 850;\r
+        * @example\r
+        * config.width = '75%';\r
+        */\r
+       width : '',\r
+\r
+       /**\r
+        * The base Z-index for floating dialogs and popups.\r
+        * @type Number\r
+        * @default 10000\r
+        * @example\r
+        * config.baseFloatZIndex = 2000\r
+        */\r
+       baseFloatZIndex : 10000\r
+\r
+};\r
+\r
+// PACKAGER_RENAME( CKEDITOR.config )\r