plugin.js 626 B

123456789101112131415161718192021
  1. ( function() {
  2. CKEDITOR.plugins.add('etranfile',
  3. {
  4. init: function(editor)
  5. {
  6. //plugin code goes here
  7. var pluginName = 'etranfile';
  8. CKEDITOR.dialog.add(pluginName, this.path + 'dialogs/etranfile.js');
  9. editor.addCommand(pluginName, new CKEDITOR.dialogCommand(pluginName));
  10. editor.ui.addButton('etranfile',
  11. {
  12. label: '附件',
  13. command: pluginName,
  14. icon: this.path + 'images/tranfile.gif',
  15. toolbar: 'etranfile'
  16. });
  17. }
  18. })
  19. } )();