diff --git a/common/resources/src/main/resources/rawfile/rich_editor.js b/common/resources/src/main/resources/rawfile/rich_editor.js
index 2aa2dc179d0df2be16c4ac8274fef70b7143f152..2b0fb7251f46214dfa1ab9cba63111e771669f46 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 = '

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