(function () { //在config.js配置文件中写的注册自定义按钮名称 b = "simpleupload"; CKEDITOR.plugins.add(b, { requires: ["dialog"], init: function (a) { a.addCommand(b, new CKEDITOR.dialogCommand(b)); //注意这里SimpleUpload是大写的,是在config.js中配置按钮名称 a.ui.addButton("SimpleUpload", { // //鼠标放在按钮上时显示提示 label: "上传图片", command: b, //自定义上传按钮图片,放在在simpleupload文件夹下的images文件夹中 icon: this.path + "images/uploadimg.png", }); //添加上传图片配置脚本,放在simpleupload文件夹下dialogs文件夹中 CKEDITOR.dialog.add(b, this.path + "dialogs/simpleupload.js"); }, }); })();