plugin.js 578 B

12345678910111213141516171819202122
  1. (function(){
  2. //Section 1 : 按下自定义按钮时执行的代码
  3. var a= {
  4. exec:function(editor)
  5. {
  6. editor.insertHtml("${html表单}");
  7. }
  8. },
  9. //Section 2 : 创建自定义按钮、绑定方法
  10. b='htmlDefForm';
  11. CKEDITOR.plugins.add(b,{
  12. init:function(editor){
  13. editor.addCommand(b,a);
  14. editor.ui.addButton('htmlDefForm',{
  15. label:'插入html表单',
  16. icon: this.path + 'document-attribute-n.png',
  17. command:b
  18. });
  19. }
  20. });
  21. })();