FCKEditor: Using a custom configuration file
Posted August 9th, 2008 in Applications
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:
- Always make FCKEditor paste as plain text (Tuesday, November 11th 2008)
- Using the FCKEditor HTML Editor with PHP (Wednesday, August 20th 2008)
Recent posts:
- MySQL queries for article summaries part 2 of 2 (Tuesday, January 6th 2009)
- Aims for 2009 (Monday, January 5th 2009)
- Weekly Roundup - January 5th 2008 (Monday, January 5th 2009)
- MySQL queries for article summaries part 1 of 2 (Sunday, January 4th 2009)
- 2008 Summary of Posts (Saturday, January 3rd 2009)
- 2008 / 2009 overview (Friday, January 2nd 2009)
Subscribe to RSS Feed / Email / Bookmark / Share
Use the buttons below to subscribe to my RSS feed to be notified next time something is posted, share this post with others, or subscribe by email and have my posts sent in a daily email.
Posts are made using the following schedule (although it may vary some weeks): Mondays & Fridays = PHP; Tuesdays & Saturdays = MySQL; Wednesdays & Sundays = Javascript/jQuery; Thursdays = HTML/CSS.
