BetterCMS
BetterCMS copied to clipboard
Extending the CKEditor
I need to install a couple more plugins for the CKEditor.
I created my own module with a descriptor that registers my main javascript file:
public override IEnumerable<JsIncludeDescriptor> RegisterJsIncludes()
{
return new[]
{
new JsIncludeDescriptor(this, "main"),
};
}
My main.js file looks like this:
bettercms.define('paste-rich-text', ['bcms.jquery', 'bcms.htmlEditor'],
function($, htmlEditor) {
// load ckeditor plugins here
}
);
My Scripts folder has the following structure:
.
|--ckeditor
| |--plugins
| | |--plugin1
| | | |--plugin.js
| | |--plugin2
| | | |--plugin.js
|--main.js
How can I get a reference to the CKEDITOR and inject the extra plugins from my main file?