I'm writing a CKEditor plugin specific to my Web app. Until now, I've successfully kept my own files outside of the CKEditor code structure, but the only documentation I can find about the plugin creation process (being a user-made tutorial, no less) says to just shoehorn my plugin code into ckeditor/_source/plugins
.
Is this really the only way to go? Am I stuck with mingling my code with CKEditor release code, or is there a way to tell it where to load plugins from? A PLUGINPATH setting, if you will?
I'm writing a CKEditor plugin specific to my Web app. Until now, I've successfully kept my own files outside of the CKEditor code structure, but the only documentation I can find about the plugin creation process (being a user-made tutorial, no less) says to just shoehorn my plugin code into ckeditor/_source/plugins
.
Is this really the only way to go? Am I stuck with mingling my code with CKEditor release code, or is there a way to tell it where to load plugins from? A PLUGINPATH setting, if you will?
Share Improve this question asked Jan 8, 2011 at 1:40 Luke MaurerLuke Maurer 8,2452 gold badges25 silver badges25 bronze badges2 Answers
Reset to default 13Looking at the tutorial you posted, I see that the section called Plugin Configuration uses CKEDITOR.plugins.add
to load the plugin resources. Have you tried using CKEDITOR.plugins.addExternal
instead? The API documentation for it can be found here.
You want to load the unpressed, unpacked plugins to load for debugging purposes right?
Just do this. Refer ckeditor_source.js
instead of . That way your created plugin inside the ckeditor.js
ckeditor/_source/plugin
s will run.
Read Minimum Setup for CKEditor with a microscope :) There is a line like this here
_source — this directory contains CKEditor source code. It is needed only if you intend to use the ckeditor_source.js script and load CKEditor from source files.
Too little documentation for a wonderful editor!
Update:
And inside the wonderful tutorial link you have provided, George Wu has mentioned that in the first paragraph also.
During development, you will want to execute from source code by using ckeditor_source.js instead of ckeditor.js.
Now, create ckeditor_source\plugins\footnote folder and plugin.js under that folder.
BTW, I found Tutorial create external plugin for CKEDITOR
helpful too.