Changeset 7107
- Timestamp:
- 07/15/11 17:26:43 (22 months ago)
- File:
-
- 1 edited
-
CKEditor/trunk/_source/core/config.js (modified) (30 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/trunk/_source/core/config.js
r6348 r7107 5 5 6 6 /** 7 * @fileOverview Defines the {@link CKEDITOR.config} object, which holds the7 * @fileOverview Defines the <code>{@link CKEDITOR.config}</code> object that stores the 8 8 * default configuration settings. 9 9 */ 10 10 11 11 /** 12 * Used in conjuction with {@link CKEDITOR.config.enterMode} and 13 * {@link CKEDITOR.config.shiftEnterMode} to make the editor produce <p> 14 * tags when using the ENTER key. 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><p></code> tags when 15 * using the <em>Enter</em> key. 15 16 * @constant 16 17 */ … … 18 19 19 20 /** 20 * Used in conjuction with {@link CKEDITOR.config.enterMode} and 21 * {@link CKEDITOR.config.shiftEnterMode} to make the editor produce <br> 22 * tags when using the ENTER key. 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><br></code> tags when 24 * using the <em>Enter</em> key. 23 25 * @constant 24 26 */ … … 26 28 27 29 /** 28 * Used in conjuction with {@link CKEDITOR.config.enterMode} and 29 * {@link CKEDITOR.config.shiftEnterMode} to make the editor produce <div> 30 * tags when using the ENTER key. 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><div></code> tags when 33 * using the <em>Enter</em> key. 31 34 * @constant 32 35 */ … … 34 37 35 38 /** 36 * @namespace Holds thedefault configuration settings. Changes to this object are37 * reflected in all editor instances, if not specifi caly specified for those38 * instance s.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. 39 42 */ 40 43 CKEDITOR.config = … … 42 45 /** 43 46 * The URL path for the custom configuration file to be loaded. If not 44 * overloaded with inline configuration s, it defaults to the "config.js"47 * overloaded with inline configuration, it defaults to the <code>config.js</code> 45 48 * file present in the root of the CKEditor installation directory.<br /><br /> 46 49 * … … 48 51 * other custom configuration files. 49 52 * @type String 50 * @default '<CKEditor folder>/config.js'53 * @default <code>'<em><CKEditor folder></em>/config.js'</code> 51 54 * @example 52 55 * // Load a specific configuration file. 53 * CKEDITOR.replace( 'myfi led', { customConfig : '/myconfig.js' } );56 * CKEDITOR.replace( 'myfield', { customConfig : '/myconfig.js' } ); 54 57 * @example 55 58 * // Do not load any custom configuration file. 56 * CKEDITOR.replace( 'myfi led', { customConfig : '' } );59 * CKEDITOR.replace( 'myfield', { customConfig : '' } ); 57 60 */ 58 61 customConfig : 'config.js', 59 62 60 63 /** 61 * Whether the replaced element (usually a textarea) is to be updated62 * automatically when posting the form containing the editor.64 * Whether the replaced element (usually a <code><textarea></code>) 65 * is to be updated automatically when posting the form containing the editor. 63 66 * @type Boolean 64 * @default true67 * @default <code>true</code> 65 68 * @example 66 69 * config.autoUpdateElement = true; … … 72 75 * editor content. 73 76 * @type String 74 * @default ''(empty)77 * @default <code>''</code> (empty) 75 78 * @example 76 79 * config.baseHref = 'http://www.example.com/path/'; … … 79 82 80 83 /** 81 * The CSS file(s) to be used to apply style to thecontents. It should84 * The CSS file(s) to be used to apply style to editor contents. It should 82 85 * reflect the CSS used in the final pages where the contents are to be 83 86 * used. 84 87 * @type String|Array 85 * @default '<CKEditor folder>/contents.css'88 * @default <code>'<em><CKEditor folder></em>/contents.css'</code> 86 89 * @example 87 90 * config.contentsCss = '/css/mysitestyles.css'; … … 91 94 92 95 /** 93 * The writ ting direction of the language used to write the editor96 * The writing direction of the language used to create the editor 94 97 * contents. Allowed values are: 95 98 * <ul> 96 * <li> 'ui' - which indicate content direction will be the same withthe user interface language direction;</li>97 * <li> 'ltr' -for Left-To-Right language (like English);</li>98 * <li> 'rtl' -for Right-To-Left languages (like Arabic).</li>99 * <li><code>'ui'</code> – indicates that content direction will be the same as the user interface language direction;</li> 100 * <li><code>'ltr'</code> – for Left-To-Right language (like English);</li> 101 * <li><code>'rtl'</code> – for Right-To-Left languages (like Arabic).</li> 99 102 * </ul> 100 * @default 'ui'103 * @default <code>'ui'</code> 101 104 * @type String 102 105 * @example … … 106 109 107 110 /** 108 * Language code of the writ ting language which is used to authorthe editor111 * Language code of the writing language which is used to create the editor 109 112 * contents. 110 * @default Same value with editor'sUI language.113 * @default Same value as editor UI language. 111 114 * @type String 112 115 * @example … … 116 119 117 120 /** 118 * The user interface language localization to use. If empty, the editor 119 * automatically localize the editor to the user language, if supported, 120 * otherwise the {@link CKEDITOR.config.defaultLanguage} language is used. 121 * @default '' (empty) 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) 122 126 * @type String 123 127 * @example … … 128 132 129 133 /** 130 * The language to be used if {@link CKEDITOR.config.language} is left empty and it's not131 * possible to localize the editor to the user language.132 * @default 'en'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> 133 137 * @type String 134 138 * @example … … 138 142 139 143 /** 140 * Sets the behavior for the ENTER key. It also dictates other behaviour141 * rules in the editor, like whether the <br>element is to be used144 * Sets the behavior of the <em>Enter</em> key. It also determines other behavior 145 * rules of the editor, like whether the <code><br></code> element is to be used 142 146 * as a paragraph separator when indenting text. 143 * The allowed values are the following constants, and their relative 144 * behavior: 147 * The allowed values are the following constants that cause the behavior outlined below: 145 148 * <ul> 146 * <li> {@link CKEDITOR.ENTER_P} (1): new <p>paragraphs are created;</li>147 * <li> {@link CKEDITOR.ENTER_BR} (2): lines are broken with <br>elements;</li>148 * <li> {@link CKEDITOR.ENTER_DIV} (3): new <div>blocks are created.</li>149 * <li><code>{@link CKEDITOR.ENTER_P}</code> (1) – new <code><p></code> paragraphs are created;</li> 150 * <li><code>{@link CKEDITOR.ENTER_BR}</code> (2) – lines are broken with <code><br></code> elements;</li> 151 * <li><code>{@link CKEDITOR.ENTER_DIV}</code> (3) – new <code><div></code> blocks are created.</li> 149 152 * </ul> 150 * <strong>Note</strong>: It 's recommended to use the151 * {@link CKEDITOR.ENTER_P} valuebecause of its semantic value and152 * correctness. The editor is optimized for this value.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. 153 156 * @type Number 154 * @default {@link CKEDITOR.ENTER_P}157 * @default <code>{@link CKEDITOR.ENTER_P}</code> 155 158 * @example 156 159 * // Not recommended. … … 160 163 161 164 /** 162 * Force the respect of {@link CKEDITOR.config.enterMode} as line break regardless of the context, 163 * E.g. If {@link CKEDITOR.config.enterMode} is set to {@link CKEDITOR.ENTER_P}, 164 * press enter key inside a 'div' will create a new paragraph with 'p' instead of 'div'. 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><div></code> element will create a new paragraph with <code><p></code> 169 * instead of a <code><div></code>. 165 170 * @since 3.2.1 166 * @default false 171 * @type Boolean 172 * @default <code>false</code> 167 173 * @example 168 174 * // Not recommended. … … 172 178 173 179 /** 174 * Just like the {@link CKEDITOR.config.enterMode} setting, it defines the behavior for the SHIFT+ENTER key.175 * The allowed values are the following constants, and their relative176 * behavior: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: 177 183 * <ul> 178 * <li> {@link CKEDITOR.ENTER_P} (1): new <p>paragraphs are created;</li>179 * <li> {@link CKEDITOR.ENTER_BR} (2): lines are broken with <br>elements;</li>180 * <li> {@link CKEDITOR.ENTER_DIV} (3): new <div>blocks are created.</li>184 * <li><code>{@link CKEDITOR.ENTER_P}</code> (1) – new <code><p></code> paragraphs are created;</li> 185 * <li><code>{@link CKEDITOR.ENTER_BR}</code> (2) – lines are broken with <code><br></code> elements;</li> 186 * <li><code>{@link CKEDITOR.ENTER_DIV}</code> (3) – new <code><div></code> blocks are created.</li> 181 187 * </ul> 182 188 * @type Number 183 * @default {@link CKEDITOR.ENTER_BR}189 * @default <code>{@link CKEDITOR.ENTER_BR}</code> 184 190 * @example 185 191 * config.shiftEnterMode = CKEDITOR.ENTER_P; … … 189 195 /** 190 196 * A comma separated list of plugins that are not related to editor 191 * instances. Reserved toplugins that extend the core code only.<br /><br />197 * instances. Reserved for plugins that extend the core code only.<br /><br /> 192 198 * 193 * There are no ways to override this setting ,except by editing the source194 * code of CKEditor ( _source/core/config.js).199 * There are no ways to override this setting except by editing the source 200 * code of CKEditor (<code>_source/core/config.js</code>). 195 201 * @type String 196 202 * @example … … 199 205 200 206 /** 201 * Sets the doctypeto be used when loading the editor content as HTML.202 * @type String 203 * @default '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'204 * @example 205 * // Set the doctype to the HTML 4 (quirks) mode.207 * Sets the <code>DOCTYPE</code> to be used when loading the editor content as HTML. 208 * @type String 209 * @default <code>'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'</code> 210 * @example 211 * // Set the DOCTYPE to the HTML 4 (Quirks) mode. 206 212 * config.docType = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">'; 207 213 */ … … 209 215 210 216 /** 211 * Sets the "id" attribute to be used on the body element of the editing212 * area. This can be useful when reusing the original CSS file you're using213 * on your live website and you want to assing to the editor the same id214 * you're using for the region that'll hold the contents. In this way,215 * id specific CSS rules willbe enabled.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. 216 222 * @since 3.1 217 223 * @type String 218 * @default ''(empty)224 * @default <code>''</code> (empty) 219 225 * @example 220 226 * config.bodyId = 'contents_id'; … … 223 229 224 230 /** 225 * Sets the "class" attribute to be used on the body element of the editing226 * area. This can be useful when reusing the original CSS file you're using227 * on your live website and you want to assing tothe editor the same class228 * name you're using for the region that'll hold the contents. In this way,229 * class specific CSS rules will be enabled.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. 230 236 * @since 3.1 231 237 * @type String 232 * @default ''(empty)238 * @default <code>''</code> (empty) 233 239 * @example 234 240 * config.bodyClass = 'contents'; … … 237 243 238 244 /** 239 * Indicates whether the contents to be edited are being inputted as a full 240 * HTML page. A full page includes the <html>, <head> and 241 * <body> tags. The final output will also reflect this setting, 242 * including the <body> contents only if this setting is disabled. 245 * Indicates whether the contents to be edited are being input as a full 246 * HTML page. A full page includes the <code><html></code>, 247 * <code><head></code>, and <code><body></code> elements. 248 * The final output will also reflect this setting, including the 249 * <code><body></code> contents only if this setting is disabled. 243 250 * @since 3.1 244 251 * @type Boolean 245 * @default false252 * @default <code>false</code> 246 253 * @example 247 254 * config.fullPage = true; … … 250 257 251 258 /** 252 * The height of editing area( content ), in relative or absolute, e.g. 30px, 5em. 253 * Note: Percentage unit is not supported yet. e.g. 30%. 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. 254 262 * @type Number|String 255 * @default '200'263 * @default <code>'200'</code> 256 264 * @example 257 265 * config.height = 500; … … 262 270 263 271 /** 264 * Comma separated list of plugins to load and initializefor an editor265 * instance. This s hould be rarely changed, using insteadthe266 * {@link CKEDITOR.config.extraPlugins}and267 * {@link CKEDITOR.config.removePlugins} for customizations.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. 268 276 * @type String 269 277 * @example … … 329 337 330 338 /** 331 * List of additional plugins to be loaded. This is a tool setting which332 * makes it easier to add new plugins, whithout having to touch and333 * possibly breaking the {@link CKEDITOR.config.plugins}setting.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. 334 342 * @type String 335 343 * @example … … 339 347 340 348 /** 341 * List of plugins that must not be loaded. This is a tool setting which 342 * makes it easier to avoid loading plugins definied in the 343 * {@link CKEDITOR.config.plugins} setting, whithout having to touch it and 344 * potentially breaking it. 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. 345 352 * @type String 346 353 * @example … … 350 357 351 358 /** 352 * List of regular expressions to be executed over the input HTML, 353 * indicating HTML source code that matched must <strong>not</strong> present in WYSIWYG mode for editing. 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. 354 362 * @type Array 355 * @default [](empty array)356 * @example 357 * config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // PHP Code358 * config.protectedSource.push( /<%[\s\S]*?%>/g ); // ASP Code359 * config.protectedSource.push( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ); // ASP.Net Code363 * @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 360 368 */ 361 369 protectedSource : [], 362 370 363 371 /** 364 * The editor tabindexvalue.372 * The editor <code>tabindex</code> value. 365 373 * @type Number 366 * @default 0(zero)374 * @default <code>0</code> (zero) 367 375 * @example 368 376 * config.tabIndex = 1; … … 371 379 372 380 /** 373 * The theme to be used to build the UI.374 * @type String 375 * @default 'default'381 * The theme to be used to build the user interface. 382 * @type String 383 * @default <code>'default'</code> 376 384 * @see CKEDITOR.config.skin 377 385 * @example … … 384 392 * editor installation path, or the name and the path separated by a comma. 385 393 * @type String 386 * @default 'default'394 * @default <code>'default'</code> 387 395 * @example 388 396 * config.skin = 'v2'; … … 393 401 394 402 /** 395 * The editor width in CSS size format or pixel integer.403 * The editor width in CSS-defined units or an integer denoting a value in pixels. 396 404 * @type String|Number 397 * @default ''(empty)405 * @default <code>''</code> (empty) 398 406 * @example 399 407 * config.width = 850; … … 404 412 405 413 /** 406 * The base Z-index for floating dialog s and popups.414 * The base Z-index for floating dialog windows and popups. 407 415 * @type Number 408 * @default 10000416 * @default <code>10000</code> 409 417 * @example 410 418 * config.baseFloatZIndex = 2000 … … 415 423 /** 416 424 * Indicates that some of the editor features, like alignment and text 417 * direction, should use d the "computed value" of the feature to indicate it's418 * on/off state ,instead of using the "real value".<br />425 * direction, should use the "computed value" of the feature to indicate its 426 * on/off state instead of using the "real value".<br /> 419 427 * <br /> 420 * If enabled , in a left to right written document, the "Left Justify"421 * alignment button will show as active, even if the aligment style is not428 * 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 422 430 * explicitly applied to the current paragraph in the editor. 423 431 * @name CKEDITOR.config.useComputedState 424 432 * @type Boolean 425 * @default true433 * @default <code>true</code> 426 434 * @since 3.4 427 435 * @example
Note: See TracChangeset
for help on using the changeset viewer.
