From 83d6431d612b5e82dfb298d8cee10a9db771cb6b Mon Sep 17 00:00:00 2001 From: zwx1126739 Date: Fri, 26 Jul 2024 09:50:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B7=BB=E5=8A=A0=E6=9C=89?= =?UTF-8?q?=E5=BA=8F=E5=88=97=E8=A1=A8=E5=90=8E=E6=97=A0=E6=B3=95=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zwx1126739 --- common/resources/src/main/resources/rawfile/rich_editor.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/common/resources/src/main/resources/rawfile/rich_editor.js b/common/resources/src/main/resources/rawfile/rich_editor.js index 936ee5e..3da5dbf 100644 --- a/common/resources/src/main/resources/rawfile/rich_editor.js +++ b/common/resources/src/main/resources/rawfile/rich_editor.js @@ -82,14 +82,12 @@ RICH_EDITOR.getListStyle = function () { if (child.nodeName === 'OL') { console.info('insertOrderedList'); document.execCommand('insertOrderedList', false, null); - child.style['list-style']; - break; + return child.style['list-style']; } if (child.nodeName === 'UL') { console.info('insertUnorderedList'); document.execCommand('insertUnorderedList', false, null); - child.style['list-style']; - break; + return child.style['list-style']; } if (child.parentNode) { child = child.parentNode; @@ -458,7 +456,6 @@ RICH_EDITOR.insertImageHtml = function (contents) { let img = document.createElement('img'); img.src = contents; selection.getRangeAt(0).insertNode(img); - return; }; document.addEventListener('click', (e) => {