diff --git a/common/resources/src/main/resources/rawfile/editor.html b/common/resources/src/main/resources/rawfile/editor.html index ceef7e4f7f46b292914ff0275ee4b37a640bf056..fe612a72024252be586a19ab49da2d09a96a6191 100644 --- a/common/resources/src/main/resources/rawfile/editor.html +++ b/common/resources/src/main/resources/rawfile/editor.html @@ -16,8 +16,6 @@
-
-
diff --git a/common/resources/src/main/resources/rawfile/editor_style.css b/common/resources/src/main/resources/rawfile/editor_style.css index a1cc7408229c461c7c1d1911c16adf06e6277c28..d1b0ec660b7e8ca942bea9702b559e03684403cd 100644 --- a/common/resources/src/main/resources/rawfile/editor_style.css +++ b/common/resources/src/main/resources/rawfile/editor_style.css @@ -26,15 +26,6 @@ body { margin: 0; } -#editorjs { - outline: 0px solid transparent; - background-repeat: no-repeat; - background-position: center; - background-size: cover; - color: #182431; - opacity: 0.9; - user-select: none; -} #editorjs_box { width: 100%; @@ -59,8 +50,6 @@ body { background: #F88805; border: 1px solid #F88805; outline: none; - margin-left: 0px; - margin-right: 0px; opacity: 1; } diff --git a/common/resources/src/main/resources/rawfile/rich_editor.js b/common/resources/src/main/resources/rawfile/rich_editor.js index 2141a1bc8c453736f71522927fbb9b7a7967edcc..affaa66895109c312b1936c7fd92c7b429a040db 100644 --- a/common/resources/src/main/resources/rawfile/rich_editor.js +++ b/common/resources/src/main/resources/rawfile/rich_editor.js @@ -15,7 +15,7 @@ var RICH_EDITOR = {}; -RICH_EDITOR.editor = document.getElementById('editorjs'); +RICH_EDITOR.editor = document.getElementById('editorjs_box'); RICH_EDITOR.setHtml = function (contents) { var base64regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; @@ -243,7 +243,7 @@ RICH_EDITOR.execFontSize = function (size, unit) { var pad = 24; RICH_EDITOR.setIndent = function () { - var parents = document.getElementById('editorjs'); + var parents = document.getElementById('editorjs_box'); parents.removeAttribute('padding-left'); if (pad >= 408) { return @@ -253,7 +253,7 @@ RICH_EDITOR.setIndent = function () { }; RICH_EDITOR.setOutdent = function () { - var parents = document.getElementById('editorjs'); + var parents = document.getElementById('editorjs_box'); parents.removeAttribute('padding-left'); if (pad === 24) { parents.style.paddingLeft = 24 + 'px'; @@ -279,8 +279,8 @@ RICH_EDITOR.insertImage = function (url) { var html = '

picvision

'; - document.getElementById('editorjs_img').innerHTML += html - document.getElementById('editorjs_img').scrollIntoView(false); + document.getElementById('editorjs_box').innerHTML += html + document.getElementById('editorjs_box').scrollIntoView(false); }; RICH_EDITOR.insertHTML = function (html) { @@ -309,7 +309,7 @@ RICH_EDITOR.addTodo = function (e) { }; RICH_EDITOR.setTodo = function () { - var parent = document.getElementById('editorjs'); + var parent = document.getElementById('editorjs_box'); var isContentEmpty = parent.innerHTML.trim().length === 0 || parent.innerHTML === '
'; var html = (isContentEmpty ? '' : '
') + '' @@ -440,8 +440,8 @@ RICH_EDITOR.insertImageHtml = function (contents) { document.addEventListener('click', (e) => { console.info(`lsq: e is ${JSON.stringify(e)}`) - var parent = document.getElementById('editorjs'); - if (parent.id !== 'editorjs') { + var parent = document.getElementById('editorjs_box'); + if (parent.id !== 'editorjs_box') { e.preventDefault() } }) @@ -499,7 +499,7 @@ function hiddenButton() { } RICH_EDITOR.getFocus = function () { - return document.getElementById('editorjs').focus(); + return document.getElementById('editorjs_box').focus(); } document.getElementById('editorjs_box').addEventListener('click', () => {