Fix error

Signed-off-by: zhanghongchuan33 <zhanghongchuan6@huawei.com>
This commit is contained in:
zhanghongchuan33
2022-05-30 16:53:59 +08:00
parent faa54a11a4
commit d2b64df045
@@ -17,7 +17,7 @@ var RICH_EDITOR = {};
RICH_EDITOR.editor = document.getElementById('editorjs');
RICH_EDITOR.setHtml = function(contents) {
RICH_EDITOR.setHtml = function (contents) {
var base64regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
if (base64regex.test(contents)) {
RICH_EDITOR.editor.innerHTML = decodeURIComponent(escape(atob(contents)));
@@ -26,7 +26,7 @@ RICH_EDITOR.setHtml = function(contents) {
}
}
RICH_EDITOR.getHtml = function() {
RICH_EDITOR.getHtml = function () {
return RICH_EDITOR.editor.innerHTML;
}