From 4e164eb979f18a6c8c33576e0709d177c6ee65e4 Mon Sep 17 00:00:00 2001 From: "@two-thousand-or-three-thousand" Date: Thu, 15 Dec 2022 17:14:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: @two-thousand-or-three-thousand --- .../src/main/resources/rawfile/editor.html | 27 +++++------ .../main/resources/rawfile/editor_style.css | 2 +- .../src/main/resources/rawfile/rich_editor.js | 45 +++++++++++-------- 3 files changed, 41 insertions(+), 33 deletions(-) diff --git a/common/resources/src/main/resources/rawfile/editor.html b/common/resources/src/main/resources/rawfile/editor.html index c0a36c3..74bfa98 100644 --- a/common/resources/src/main/resources/rawfile/editor.html +++ b/common/resources/src/main/resources/rawfile/editor.html @@ -4,19 +4,20 @@ "editorJs" - - + + + + + + +
-
+ + +
+
@@ -34,8 +35,8 @@
- + + + \ No newline at end of file diff --git a/common/resources/src/main/resources/rawfile/editor_style.css b/common/resources/src/main/resources/rawfile/editor_style.css index 008c4d4..47fbaf0 100644 --- a/common/resources/src/main/resources/rawfile/editor_style.css +++ b/common/resources/src/main/resources/rawfile/editor_style.css @@ -37,7 +37,7 @@ body { background-size: cover; color: #182431; opacity: 0.9; - font-size: 16vp; + font-size: 24px; overflow: scroll; user-select: none; } diff --git a/common/resources/src/main/resources/rawfile/rich_editor.js b/common/resources/src/main/resources/rawfile/rich_editor.js index c18920a..e920c79 100644 --- a/common/resources/src/main/resources/rawfile/rich_editor.js +++ b/common/resources/src/main/resources/rawfile/rich_editor.js @@ -428,6 +428,13 @@ RICH_EDITOR.insertImageHtml = function (contents) { selection.getRangeAt(0).insertNode(img); }; +document.getElementById('addToDo').addEventListener('click', (e) => { + console.info(`lsq: e is ${JSON.stringify(e)}`) + if (e.id !== 'editorjs') { + e.preventDefault() + } +}) + document.getElementById('addToDo').addEventListener('click', () => { callBackToApp.addToDo() }) @@ -442,12 +449,12 @@ document.getElementById('openAlbum').addEventListener('click', () => { function changeSizeToRk() { document.getElementById('editorjs').style.fontSize = '24px'; - document.getElementById('img1').style.fontSize = '40px'; - document.getElementById('img1').style.fontSize = '40px'; - document.getElementById('img2').style.fontSize = '40px'; - document.getElementById('img2').style.fontSize = '40px'; - document.getElementById('img3').style.fontSize = '40px'; - document.getElementById('img3').style.fontSize = '40px'; + document.getElementById('img1').style.width = '40px'; + document.getElementById('img1').style.height = '40px'; + document.getElementById('img2').style.width = '40px'; + document.getElementById('img2').style.height = '40px'; + document.getElementById('img3').style.width = '40px'; + document.getElementById('img3').style.height = '40px'; document.getElementById('lable1').style.fontSize = '20px'; document.getElementById('lable2').style.fontSize = '20px'; document.getElementById('lable3').style.fontSize = '20px'; @@ -455,12 +462,12 @@ function changeSizeToRk() { function changeSizeToPhone() { document.getElementById('editorjs').style.fontSize = '16px'; - document.getElementById('img1').style.fontSize = '24px'; - document.getElementById('img1').style.fontSize = '24px'; - document.getElementById('img2').style.fontSize = '24px'; - document.getElementById('img2').style.fontSize = '24px'; - document.getElementById('img3').style.fontSize = '24px'; - document.getElementById('img3').style.fontSize = '24px'; + document.getElementById('img1').style.width = '24px'; + document.getElementById('img1').style.height = '24px'; + document.getElementById('img2').style.width = '24px'; + document.getElementById('img2').style.height = '24px'; + document.getElementById('img3').style.width = '24px'; + document.getElementById('img3').style.height = '24px'; document.getElementById('lable1').style.fontSize = '12px'; document.getElementById('lable2').style.fontSize = '12px'; document.getElementById('lable3').style.fontSize = '12px'; @@ -468,12 +475,12 @@ function changeSizeToPhone() { function changeSizeToTablet() { document.getElementById('editorjs').style.fontSize = '16px'; - document.getElementById('img1').style.fontSize = '28px'; - document.getElementById('img1').style.fontSize = '28px'; - document.getElementById('img2').style.fontSize = '28px'; - document.getElementById('img2').style.fontSize = '28px'; - document.getElementById('img3').style.fontSize = '28px'; - document.getElementById('img3').style.fontSize = '28px'; + document.getElementById('img1').style.width = '28px'; + document.getElementById('img1').style.height = '28px'; + document.getElementById('img2').style.width = '28px'; + document.getElementById('img2').style.height = '28px'; + document.getElementById('img3').style.width = '28px'; + document.getElementById('img3').style.height = '28px'; document.getElementById('lable1').style.fontSize = '12px'; document.getElementById('lable2').style.fontSize = '12px'; document.getElementById('lable3').style.fontSize = '12px'; @@ -484,7 +491,7 @@ function hiddenButton() { } RICH_EDITOR.getFocus = function() { - return document.GetElementById('editorjs').focus(); + return document.getElementById('editorjs').focus(); } document.getElementById('editorjs').addEventListener('click', () => { -- Gitee