diff --git a/public/static/plugs/ckeditor/config.js b/public/static/plugs/ckeditor/config.js index fb7798498..4ece882b3 100644 --- a/public/static/plugs/ckeditor/config.js +++ b/public/static/plugs/ckeditor/config.js @@ -22,8 +22,8 @@ CKEDITOR.plugins.add("uimage", { editor.ui.addButton("UploadImage", {label: "上传本地图片", command: 'uimage', icon: 'image', toolbar: 'insert,10'}); setTimeout(function () { $('#cke_' + editor.name).find('.cke_button__uploadimage_label').parent().map(function () { - $(this).attr('data-type', 'png,jpg,gif').uploadFile(function (url) { - editor.insertElement(CKEDITOR.dom.element.createFromHtml('')); + $(this).attr('data-type', 'png,jpg,gif').attr('data-file', 'mul').uploadFile(function (url) { + editor.insertElement(CKEDITOR.dom.element.createFromHtml('')); }); }); }, 100); @@ -36,7 +36,7 @@ CKEDITOR.plugins.add('umusic', { editor.ui.addButton("UploadMusic", {label: "上传MP3文件", command: 'umusic', icon: 'specialchar', toolbar: 'insert,10'}); setTimeout(function () { $('#cke_' + editor.name).find('.cke_button__uploadmusic_label').parent().map(function () { - $(this).attr('data-type', 'mp3').uploadFile(function (url) { + $(this).attr('data-type', 'mp3').attr('data-file', 'mul').uploadFile(function (url) { editor.insertElement(CKEDITOR.dom.element.createFromHtml('')); }); }); @@ -50,7 +50,7 @@ CKEDITOR.plugins.add('uvideo', { editor.ui.addButton("UploadVideo", {label: "上传MP4文件", command: 'uvideo', icon: 'flash', toolbar: 'insert,10'}); setTimeout(function () { $('#cke_' + editor.name).find('.cke_button__uploadvideo_label').parent().map(function () { - $(this).attr('data-type', 'mp4').uploadFile(function (url) { + $(this).attr('data-type', 'mp4').attr('data-file', 'mul').uploadFile(function (url) { editor.insertElement(CKEDITOR.dom.element.createFromHtml('')); }); }); @@ -71,4 +71,4 @@ CKEDITOR.plugins.add('uhtml', { } }); } -}); \ No newline at end of file +});