How to add or remove plugins without changing web assist generated code.
I use come different plugins with CKEditor from time to time, and I thought I might share this information in case it is useful to someone.
Adding or removing plugins before the editor loads is a piece of cake. This can be useful if you want to include plugins which are not part of the WA extension. To use plugins that are not part of the WA extension, you either need to hard code the plugin into the configuration file for CKEditor, or add a line to the generated code. In either case, when you edit the editor instance, you have to reapply your changes.
This is also useful if you have hard coded an additional plugin because you use it most of the time, but don't want it on a particular page. In that case, you can't use the WA GUI to control the plugin.
With this method, you won't have to do anything to the WA code when you edit the HTMLEditor instance.
To include or remove an additional plugin to the editor per page, do the following:
Now the object CKEDITOR has been instantiated. Just below this inclusion, add the following code:
CKEDITOR.config.extraPlugins = 'bbcode';
CKEDITOR.config.removePlugins = 'smiley';
This code would include the bbcode plugin and remove the smiley plugin from all subsequent CKEditor instances on the page.
I have not looked into adding or removing a plugin after the CKEditor instance has been created, so I do not know if that is feasible. That would be helpful for adding or removing plugins to a specific instance of the editor. Right now, the best way to do that is to add a line to the WA code like this:
$CKEditor_config["extraPlugins "] = "bbcode, adobeair";
$CKEditor_config["removePlugins "] = "smiley";
That code will have to be redone if you use the WA GUI to edit the instance of the editor.
* Some of the plugins in the example code are controllable with the GUI which would obviously be a better method for controlling them. This is just an example.