Here is a simple example...
CKEDITOR.plugins.add( 'testplugin', {
init : function( editor ) {
CKEDITOR.plugins.add( 'charcount', { init : function( editor ) {
editor.on('instanceReady', function(event) {
alert('test');
}, editor, null, 100);
}
});
Any reason this is not showing a dialog box with "test" in it when a ckeditor instance is loaded? The instance loads fine but this never runs.
We added the plugin using:
extraPlugins: 'testplugin'
atdev,
atdev,
Thought I would reply since your example is what helped me get my plugin built. If you're just trying to get the alert to pop, you don't need the first "add plugin" code. You also need to enclose the entire plugin within a function.
(function() {
CKEDITOR.plugins.add( 'charcount', { init : function( editor ) {
editor.on('instanceReady', function(event) {
alert('test');
}, editor, null, 100);
}
});
})();
Then, the line you would want to add to your config.extraPlugins would be 'charcount'.
Hope this helps.
Adam