plugin.js 675 B

12345678910111213141516171819202122232425
  1. (function(){
  2. //Section 1 : 按下自定义按钮时执行的代码
  3. var a= {
  4. exec:function(editor)
  5. {
  6. var defId=$("#defId").val();
  7. FlowVarWindow({defId:defId,callback:function(varKey,varName){
  8. editor.insertHtml("{"+varName+":"+varKey+"}");
  9. }});
  10. }
  11. },
  12. //Section 2 : 创建自定义按钮、绑定方法
  13. b='vars';
  14. CKEDITOR.plugins.add(b,{
  15. init:function(editor){
  16. editor.addCommand(b,a);
  17. editor.ui.addButton('vars',{
  18. label:'流程变量',
  19. icon: this.path + 'vars.png',
  20. command:b
  21. });
  22. }
  23. });
  24. })();