Line 44: | Line 44: | ||
'''NOTE''':You need to keep the original configuration file, "fckconfig.js", in the editor directory. Don't delete it. <br><br> | '''NOTE''':You need to keep the original configuration file, "fckconfig.js", in the editor directory. Don't delete it. <br><br> | ||
− | + | === Browser Caching === | |
+ | |||
== Editor Behavior == | == Editor Behavior == |
Revision as of 15:14, 8 January 2008
Contents
Overriding the Default Configurations
To simplify updating FCKeditor on your sites, the best approach is to put all your configuration in a separate file, outside the editor's package directory structure. In this way, you just need to overwrite the editor's directory to update it to a newer version.
Step 1
Create a file called "myconfig.js" or any other .js file and put it in the root directory of the site (or wherever you want). You will input the configuration in this file. Example: you want to change the default FCKeditor language to French. Apply this code into your file:
FCKConfig.AutoDetectLanguage = false ; FCKConfig.DefaultLanguage = "fr" ;
Step 2
Now we have to tell the editor that it has to load my custom configuration. There are two methodes to do it:
Method 1
Find the following line in the main configuration file (fckconfig.js):
FCKConfig.CustomConfigurationsPath = '' ;
and put in the path of your config file (myconfig.js) in the brackets:
FCKConfig.CustomConfigurationsPath = '/myconfig.js' ;
The above method is good, but, as you can imagine, you lose the facility not to touch the original files. In any case it is easier to remember that you just need to change one line, and all the other things remain separated.
Methode 2
There is an even better way to have the same results as described above, but without touching the fckconfig.js file. You can set the custom configurations path from the page that uses the editor. Example in JavaScript prefered server side language:
var oFCKeditor = new FCKeditor( "FCKeditor1" ) ; oFCKeditor.Config["CustomConfigurationsPath"] = "/myconfig.js" ; oFCKeditor.Create() ;
The same method can be used with your preferred server side language. Take a look at the samples to find out how to manipulate the configurations by code.
Summary
When overriding configurations, the following steps are done:
- The configuration in the main configuration file (fckconfig.js) are loaded.
- The configuration is overridden by the settings in the custom configuration file (if provided).
- The configuration is overridden by the settings done in the editor page (if provided), except for the "CustomConfigurationsPath", that is set after step 1.
You don't need to include all configuration options in your custom file, just those you want to change. Your file will "override" the original one.
NOTE:You need to keep the original configuration file, "fckconfig.js", in the editor directory. Don't delete it.
Browser Caching
Editor Behavior
- BaseHref
- BodyId and BodyClass
- CleanWordKeepsStructure
- DefaultLinkTarget
- DocType
- EditorAreaCSS
- ToolbarComboPreviewCSS
- ForcePasteAsPlainText
- FullPage
- StartupFocus
- TemplateReplaceAll
- TemplateReplaceCheckbox
HTML Output
- AdditionalNumericEntities
- EnterMode
- FillEmptyBlocks
- ForceSimpleAmpersand
- ForceStrongEm
- FormatIndentator
- FormatOutput
- FormatSource
- IncludeGreekEntities
- IncludeLatinEntities
- ProcessHTMLEntities
- ProcessNumericEntities
- ShiftEnterMode
- UseBROnCarriageReturn
Advanced
- BrowserContextMenuOnCtrl
- CustomConfigurationsPath
- FirefoxSpellChecker
- GeckoUseSPAN
- IeSpellDownloadUrl
- PreserveSessionOnFileBrowser
- ProtectedSource
- ProtectedTags