X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Fconfig.js;h=a408d9348e901d62afe0f4b308cdee8f8b8cef5f;hb=039a051ccf3901311661022a30afd60fc38130c9;hp=caa8d539598fcdb7ccf969e2fb5adf72a2f7e10e;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91;p=ckeditor.git diff --git a/_source/core/config.js b/_source/core/config.js index caa8d53..a408d93 100644 --- a/_source/core/config.js +++ b/_source/core/config.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -8,19 +8,34 @@ For licensing, see LICENSE.html or http://ckeditor.com/license * default configuration settings. */ +/** + * Used in conjuction with {@link CKEDITOR.config.enterMode} and + * {@link CKEDITOR.config.shiftEnterMode} to make the editor produce <p> + * tags when using the ENTER key. + * @constant + */ CKEDITOR.ENTER_P = 1; + +/** + * Used in conjuction with {@link CKEDITOR.config.enterMode} and + * {@link CKEDITOR.config.shiftEnterMode} to make the editor produce <br> + * tags when using the ENTER key. + * @constant + */ CKEDITOR.ENTER_BR = 2; + +/** + * Used in conjuction with {@link CKEDITOR.config.enterMode} and + * {@link CKEDITOR.config.shiftEnterMode} to make the editor produce <div> + * tags when using the ENTER key. + * @constant + */ CKEDITOR.ENTER_DIV = 3; /** - * Holds the default configuration settings. Changes to this object are + * @namespace Holds the default configuration settings. Changes to this object are * reflected in all editor instances, if not specificaly specified for those * instances. - * @namespace - * @example - * // All editor created after the following setting will not load custom - * // configuration files. - * CKEDITOR.config.customConfig = ''; */ CKEDITOR.config = { @@ -40,7 +55,7 @@ CKEDITOR.config = * // Do not load any custom configuration file. * CKEDITOR.replace( 'myfiled', { customConfig : '' } ); */ - customConfig : CKEDITOR.getUrl( 'config.js' ), + customConfig : 'config.js', /** * Whether the replaced element (usually a textarea) is to be updated @@ -56,40 +71,55 @@ CKEDITOR.config = * The base href URL used to resolve relative and absolute URLs in the * editor content. * @type String - * @default '' (empty string) + * @default '' (empty) * @example * config.baseHref = 'http://www.example.com/path/'; */ baseHref : '', /** - * The CSS file to be used to apply style to the contents. It should + * The CSS file(s) to be used to apply style to the contents. It should * reflect the CSS used in the final pages where the contents are to be * used. - * @type String + * @type String|Array * @default '<CKEditor folder>/contents.css' * @example * config.contentsCss = '/css/mysitestyles.css'; + * config.contentsCss = ['/css/mysitestyles.css', '/css/anotherfile.css']; */ contentsCss : CKEDITOR.basePath + 'contents.css', /** * The writting direction of the language used to write the editor - * contents. Allowed values are 'ltr' for Left-To-Right language (like - * English), or 'rtl' for Right-To-Left languages (like Arabic). - * @default 'ltr' + * contents. Allowed values are: + * + * @default 'ui' * @type String * @example * config.contentsLangDirection = 'rtl'; */ - contentsLangDirection : 'ltr', + contentsLangDirection : 'ui', + + /** + * Language code of the writting language which is used to author the editor + * contents. + * @default Same value with editor's UI language. + * @type String + * @example + * config.contentsLanguage = 'fr'; + */ + contentsLanguage : '', /** * The user interface language localization to use. If empty, the editor * automatically localize the editor to the user language, if supported, * otherwise the {@link CKEDITOR.config.defaultLanguage} language is used. - * @default true - * @type Boolean + * @default '' (empty) + * @type String * @example * // Load the German interface. * config.language = 'de'; @@ -129,6 +159,18 @@ CKEDITOR.config = enterMode : CKEDITOR.ENTER_P, /** + * Force the respect of {@link CKEDITOR.config.enterMode} as line break regardless of the context, + * E.g. If {@link CKEDITOR.config.enterMode} is set to {@link CKEDITOR.ENTER_P}, + * press enter key inside a 'div' will create a new paragraph with 'p' instead of 'div'. + * @since 3.2.1 + * @default false + * @example + * // Not recommended. + * config.forceEnterMode = true; + */ + forceEnterMode : false, + + /** * Just like the {@link CKEDITOR.config.enterMode} setting, it defines the behavior for the SHIFT+ENTER key. * The allowed values are the following constants, and their relative * behavior: @@ -166,10 +208,39 @@ CKEDITOR.config = docType : '', /** + * Sets the "id" attribute to be used on the body element of the editing + * area. This can be useful when reusing the original CSS file you're using + * on your live website and you want to assing to the editor the same id + * you're using for the region that'll hold the contents. In this way, + * id specific CSS rules will be enabled. + * @since 3.1 + * @type String + * @default '' (empty) + * @example + * config.bodyId = 'contents_id'; + */ + bodyId : '', + + /** + * Sets the "class" attribute to be used on the body element of the editing + * area. This can be useful when reusing the original CSS file you're using + * on your live website and you want to assing to the editor the same class + * name you're using for the region that'll hold the contents. In this way, + * class specific CSS rules will be enabled. + * @since 3.1 + * @type String + * @default '' (empty) + * @example + * config.bodyClass = 'contents'; + */ + bodyClass : '', + + /** * Indicates whether the contents to be edited are being inputted as a full * HTML page. A full page includes the <html>, <head> and * <body> tags. The final output will also reflect this setting, * including the <body> contents only if this setting is disabled. + * @since 3.1 * @type Boolean * @default false * @example @@ -178,13 +249,14 @@ CKEDITOR.config = fullPage : false, /** - * The editor height, in CSS size format or pixel integer. + * The height of editing area( content ), in relative or absolute, e.g. 30px, 5em. + * Note: Percentage unit is not supported yet. e.g. 30%. * @type Number|String * @default '200' * @example * config.height = 500; - * @example * config.height = '25em'; + * config.height = '300px'; */ height : 200, @@ -196,7 +268,63 @@ CKEDITOR.config = * @type String * @example */ - 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', + plugins : + 'about,' + + 'a11yhelp,' + + 'basicstyles,' + + 'bidi,' + + 'blockquote,' + + 'button,' + + 'clipboard,' + + 'colorbutton,' + + 'colordialog,' + + 'contextmenu,' + + 'dialogadvtab,' + + 'div,' + + 'elementspath,' + + 'enterkey,' + + 'entities,' + + 'filebrowser,' + + 'find,' + + 'flash,' + + 'font,' + + 'format,' + + 'forms,' + + 'horizontalrule,' + + 'htmldataprocessor,' + + 'image,' + + 'indent,' + + 'justify,' + + 'keystrokes,' + + 'link,' + + 'list,' + + 'liststyle,' + + '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', /** * List of additional plugins to be loaded. This is a tool setting which @@ -281,7 +409,22 @@ CKEDITOR.config = * config.baseFloatZIndex = 2000 */ baseFloatZIndex : 10000 - }; +/** + * Indicates that some of the editor features, like alignment and text + * direction, should used the "computed value" of the feature to indicate it's + * on/off state, instead of using the "real value".
+ *
+ * If enabled, in a left to right written document, the "Left Justify" + * alignment button will show as active, even if the aligment style is not + * explicitly applied to the current paragraph in the editor. + * @name CKEDITOR.config.useComputedState + * @type Boolean + * @default true + * @since 3.4 + * @example + * config.useComputedState = false; + */ + // PACKAGER_RENAME( CKEDITOR.config )