FCKEditor: Using a custom configuration file

Posted in FCKEditor -

A little while back I posted about how I upgrade FCKEditor when a new release comes out, and how I need to merge changes from my old fckconfig.js to the new one for the new release. I have since learned how to use a custom configuration file with FCKEditor which means no longer needing to merge changes into the new version of the file.

It's really quite simple; you appear to be able to modify any configuration setting programmatically with FCKEditor and there's a configuration setting called "CustomConfigurationsPath" which specifies the location of your customer file which is then loaded after the main fckconfig.js

In PHP, you would do it like this (in other programming languages it will be similar):

$FCKeditor = new FCKeditor('myinstance');
$FCKeditor->Config["CustomConfigurationsPath"] = "/path/to/myconfig.js";
... other options ...
$FCKeditor->Create();

This tells FCKEditor to load the myconfig.js file and supplement and override the configurations options in the main fckconfig.js file.



Related posts:


Comments