No matter what, only the last plugin is executed.
I see that both plugin.js are loaded properly. Both Icons and title text are correct in the editor. No error messages.
Here's my code:
CKEDITOR.replace( 'body', { filebrowserBrowseUrl : '/' + gPath + '/' + 'frmBrowseFiles?ReadForm', filebrowserImageBrowseUrl : '/' + gPath + '/' + 'frmBrowseImages?ReadForm', filebrowserLinkBrowseUrl : '/' + gPath + '/' + 'vGetLinks?OpenView', skin: 'classic', extraPlugins : 'dnewpage,dcopypage', toolbar: [ ['Source'],['Save','dNewPage','dCopyPage','Preview'], ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Scayt'], ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], ['Image','Flash','Table','Smiley','SpecialChar','PageBreak'], '/', ['Styles','Format'], ['Bold','Italic','Strike'], ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'], ['Link','Unlink','Anchor'], ['Maximize'] ] })
In this case the "dcopypage" is always executed regardless if you press dNewPage. It's always the last one specified by extraPlugins.
dNewPage/plugin.js
(function(){ var a = { exec: function(c){ debugger; if(c.checkDirty()) if(confirm('You will lose any unsaved changes!\n\nContinue?')==false) return false; window.location.href='/' + gPath + '/frmInfo?ReadForm'; } } b = 'dnewpage'; CKEDITOR.plugins.add(b, { init: function(c){ var d = c.addCommand(b, a); c.ui.addButton('dNewPage', { label: c.lang.newPage, icon: this.path + 'document-new.png', command: b }); } }); })();
dCopyPage/plugin.js
(function(){ var a = { exec: function(c){ debugger; if(c.checkDirty()) if(confirm('You will lose any unsaved changes!\n\nContinue?')==false) return false; window.location.href='/' + gPath + '/agentCopyDoc?OpenAgent&unid=' +gUNID; } } b = 'dcopypage'; CKEDITOR.plugins.add(b, { init: function(c){ var d = c.addCommand(b, a); c.ui.addButton('dCopyPage', { label: c.lang.copyPage, icon: this.path + 'edit-copy.png', command: b }); } }); })();
It's driving my absolutely insane....
Any help appreciated!
/J
Re: Problems adding more then one plugin?
How do you go about it in such case?
Thanks!
/J