From 61d49e6a45539a6c959169601131715489bf8d08 Mon Sep 17 00:00:00 2001 From: wangzhiyusss Date: Tue, 7 Mar 2023 15:49:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9B=BE=E7=89=87=E5=B7=A6?= =?UTF-8?q?=E7=A7=BB=E5=9B=BE=E6=96=87=E6=B7=B7=E4=B9=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangzhiyusss --- common/resources/src/main/resources/rawfile/editor.html | 1 + common/resources/src/main/resources/rawfile/rich_editor.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/resources/src/main/resources/rawfile/editor.html b/common/resources/src/main/resources/rawfile/editor.html index dbb4c09..9bda9dd 100644 --- a/common/resources/src/main/resources/rawfile/editor.html +++ b/common/resources/src/main/resources/rawfile/editor.html @@ -17,6 +17,7 @@
+
diff --git a/common/resources/src/main/resources/rawfile/rich_editor.js b/common/resources/src/main/resources/rawfile/rich_editor.js index 2aa2dc1..2b0fb72 100644 --- a/common/resources/src/main/resources/rawfile/rich_editor.js +++ b/common/resources/src/main/resources/rawfile/rich_editor.js @@ -27,7 +27,7 @@ RICH_EDITOR.setHtml = function (contents) { }; RICH_EDITOR.getHtml = function () { - return RICH_EDITOR.editor.innerHTML; + return document.getElementById('editorjs_box').editor.innerHTML; }; RICH_EDITOR.undo = function () { @@ -279,8 +279,8 @@ RICH_EDITOR.insertImage = function (url) { var html = '

picvision

'; - RICH_EDITOR.insertHTML(html); - RICH_EDITOR.editor.scrollIntoView(false); + document.getElementById('editorjs').innerHTML += html + document.getElementById('editorjs').scrollIntoView(false); }; RICH_EDITOR.insertHTML = function (html) { -- Gitee