From 4e4d3c691779404bed16385158fb25a66c5e0109 Mon Sep 17 00:00:00 2001 From: Anyon Date: Mon, 26 Aug 2019 10:28:28 +0800 Subject: [PATCH] Update config.js --- public/static/plugs/ckeditor/config.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/static/plugs/ckeditor/config.js b/public/static/plugs/ckeditor/config.js index 4ece882b3..a38b81484 100644 --- a/public/static/plugs/ckeditor/config.js +++ b/public/static/plugs/ckeditor/config.js @@ -64,9 +64,10 @@ CKEDITOR.plugins.add('uhtml', { editor.ui.addButton("UploadHtml", {label: "插入HTML代码", command: 'uhtml', icon: 'creatediv', toolbar: 'insert,10'}); editor.addCommand('uhtml', { exec: function (editor) { - layer.prompt({title: '插入HTML代码', formType: 2, area: ['600px', '300px']}, function (html, index) { - var element = CKEDITOR.dom.element.createFromHtml('
' + html + '
'); - editor.insertElement(element), layer.close(index); + layer.prompt({title: '插入HTML代码', formType: 2, area: ['600px', '300px']}, function (html, index, element) { + element = CKEDITOR.dom.element.createFromHtml('
' + html + '
'); + editor.insertElement(element); + layer.close(index); }); } });