Configuration Options

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

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:

  1. The configuration in the main configuration file (fckconfig.js) are loaded.
  2. The configuration is overridden by the settings in the custom configuration file (if provided).
  3. 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.


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