星火管控前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

plugin.js 811B

1234567891011121314151617181920
  1. (function () {
  2. //在config.js配置文件中写的注册自定义按钮名称
  3. b = "simpleupload";
  4. CKEDITOR.plugins.add(b, {
  5. requires: ["dialog"],
  6. init: function (a) {
  7. a.addCommand(b, new CKEDITOR.dialogCommand(b));
  8. //注意这里SimpleUpload是大写的,是在config.js中配置按钮名称
  9. a.ui.addButton("SimpleUpload", {
  10. // //鼠标放在按钮上时显示提示
  11. label: "上传图片",
  12. command: b,
  13. //自定义上传按钮图片,放在在simpleupload文件夹下的images文件夹中
  14. icon: this.path + "images/uploadimg.png",
  15. });
  16. //添加上传图片配置脚本,放在simpleupload文件夹下dialogs文件夹中
  17. CKEDITOR.dialog.add(b, this.path + "dialogs/simpleupload.js");
  18. },
  19. });
  20. })();