1 /* 2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. 3 For 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 11 CKEDITOR.ENTER_P = 1; 12 CKEDITOR.ENTER_BR = 2; 13 CKEDITOR.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 */ 25 CKEDITOR.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 '<CKEditor folder>/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 : CKEDITOR.getUrl( 'config.js' ), 44 45 autoUpdateElement : true, 46 47 /** 48 * The base href URL used to resolve relative and absolute URLs in the 49 * editor content. 50 * @type String 51 * @default '' (empty string) 52 * @example 53 * config.baseHref = 'http://www.example.com/path/'; 54 */ 55 baseHref : '', 56 57 /** 58 * The CSS file to be used to apply style to the contents. It should 59 * reflect the CSS used in the final pages where the contents are to be 60 * used. 61 * @type String 62 * @default '<CKEditor folder>/contents.css' 63 * @example 64 * config.contentsCss = '/css/mysitestyles.css'; 65 */ 66 contentsCss : CKEDITOR.basePath + 'contents.css', 67 68 /** 69 * The writting direction of the language used to write the editor 70 * contents. Allowed values are 'ltr' for Left-To-Right language (like 71 * English), or 'rtl' for Right-To-Left languages (like Arabic). 72 * @default 'ltr' 73 * @type String 74 * @example 75 * config.contentsLangDirection = 'rtl'; 76 */ 77 contentsLangDirection : 'ltr', 78 79 /** 80 * Instructs the editor to automatically localize the editor to the user 81 * language, if possible. If set to false, the [@link #defaultLanguage] 82 * language is used. 83 * @default true 84 * @type Boolean 85 * @example 86 * // Forces the editor to always load the German interface. 87 * config.autoLanguage = false; 88 * config.defaultLanguage = 'de'; 89 */ 90 autoLanguage : true, 91 92 /** 93 * The language to be used if [@link #autoLanguage] is set to false, or 94 * when it's not possible to localize the editor to the user language. 95 * @default 'en' 96 * @type String 97 * @example 98 * config.defaultLanguage = 'it'; 99 */ 100 defaultLanguage : 'en', 101 102 enterMode : CKEDITOR.ENTER_P, 103 shiftEnterMode : CKEDITOR.ENTER_BR, 104 105 /** 106 * A comma separated list of plugins that are not related to editor 107 * instances. Reserved to plugins that extend the core code only.<br /><br /> 108 * 109 * There are no ways to override this setting, except by editing the source 110 * code of CKEditor (_source/core/config.js). 111 * @type String 112 * @example 113 */ 114 corePlugins : '', 115 116 /** 117 * Sets the doctype to be used when loading the editor content as HTML. 118 * @type String 119 * @default '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' 120 * @example 121 * // Set the doctype to the HTML 4 (quirks) mode. 122 * config.docType = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">'; 123 */ 124 docType : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">', 125 126 /** 127 * Indicates whether the contents to be edited are being inputted as a full 128 * HTML page. A full page includes the <html>, <head> and 129 * <body> tags. The final output will also reflect this setting, 130 * including the <body> contents only if this setting is disabled. 131 * @type Boolean 132 * @default false 133 * @example 134 * config.fullPage = true; 135 */ 136 fullPage : false, 137 138 /** 139 * The editor height, in CSS size format or pixel integer. 140 * @type String|Number 141 * @default '200' 142 * @example 143 */ 144 height : 200, 145 146 /** 147 * Comma separated list of plugins to load and initialize for an editor 148 * instance. 149 * @type String 150 * @example 151 * config.plugins = 'basicstyles,button,htmldataprocessor,toolbar,wysiwygarea'; 152 */ 153 154 plugins : 'basicstyles,blockquote,button,clipboard,colorbutton,contextmenu,elementspath,enterkey,entities,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,save,smiley,showblocks,sourcearea,stylescombo,table,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc', 155 156 /** 157 * The editor tabindex value. 158 * @type Number 159 * @default 0 (zero) 160 * @example 161 * config.tabIndex = 1; 162 */ 163 tabIndex : 0, 164 165 /** 166 * The theme to be used to build the UI. 167 * @type String 168 * @default 'default' 169 * @see CKEDITOR.config.skin 170 * @example 171 * config.theme = 'default'; 172 */ 173 theme : 'default', 174 175 /** 176 * The skin to load. 177 * @type String 178 * @default 'default' 179 * @example 180 * config.skin = 'v2'; 181 */ 182 skin : 'default', 183 184 /** 185 * The editor width in CSS size format or pixel integer. 186 * @type String|Number 187 * @default '100%' 188 * @example 189 */ 190 width : '100%', 191 192 /** 193 * The base Z-index for floating dialogs and popups. 194 * @type Number 195 * @default 10000 196 * @example 197 * config.baseFloatZIndex = 2000 198 */ 199 baseFloatZIndex : 10000 200 201 }; 202 203 // PACKAGER_RENAME( CKEDITOR.config ) 204