The way I did this was to modify the form control for Rich Text Editor. I added a property called ConfigFile. In the code for the control (HtmlAreaControl.ascx.cs) i added the property:
public string ConfigFile
{
get
{
return GetValue("ConfigFile", "");
}
set
{
SetValue("ConfigFile", value);
}
}
I then added this to set the config file to use in Page_Load
:
// Get editor area toolbar
//next two lines are already there, just so you can find the place to add it
editor.ToolbarSet = DataHelper.GetNotEmpty(GetValue("toolbarset"), (Form != null) ? Form.HtmlAreaToolbar : String.Empty);
editor.ToolbarLocation = DataHelper.GetNotEmpty(GetValue("toolbarlocation"), (Form != null) ? Form.HtmlAreaToolbarLocation : String.Empty);
//Set Custom Config File
if (ConfigFile != "")
{
editor.CustomConfig = ConfigFile;
}
Now on anything that uses this control, when setting up the fields, I can click advanced, and set the config file I want to use, just need the name like Custom.js. The new config file goes in CMSAdminControls > CKEditor
, right next to the default config.js file.