user744587
user744587

Reputation:

CKEditor : How to load the my own javascript file

I am using CKEditor in my web app and new to it. It seems my js file isn't downloading with CKEditor, how to include external js files in CKEditor ?

Upvotes: 2

Views: 5190

Answers (1)

Mark
Mark

Reputation: 3271

Configuration related js needs to be in config.js

All plugin related files go in the plugins plugins/[plugin_name]/plugin.js You'll need to add them to the config using extraPlugins config.extraPlugins: 'plugin',

If you want to do something else you can just load another .js

for example:

<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="customcode.js"></script></code>

in customcode.js you can put your eventhandling and overrides

CKEDITOR.on( 'instanceReady', function( ev )
{
    alert("CKEditor is loaded");
});

Upvotes: 4

Related Questions