BetterCMS icon indicating copy to clipboard operation
BetterCMS copied to clipboard

Extending the CKEditor

Open cosminonea opened this issue 8 years ago • 0 comments

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?

cosminonea avatar Jun 26 '16 13:06 cosminonea