plugin.js 587 B

1234567891011121314151617181920212223
  1. (function(){
  2. //Section 1 : 按下自定义按钮时执行的代码
  3. var a= {
  4. exec:function(editor)
  5. {
  6. //addClick();
  7. editor.insertHtml("${跳转地址}");
  8. }
  9. },
  10. //Section 2 : 创建自定义按钮、绑定方法
  11. b='jumpurl';
  12. CKEDITOR.plugins.add(b,{
  13. init:function(editor){
  14. editor.addCommand(b,a);
  15. editor.ui.addButton('jumpurl',{
  16. label:'插入跳转地址',
  17. icon: this.path + 'icon002a10.gif',
  18. command:b
  19. });
  20. }
  21. });
  22. })();