diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-09-21 18:39:53 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-09-21 18:39:53 +0800 |
commit | 98bb740761c350d856df285c603894ac83fa19cd (patch) | |
tree | aed3473287f18d78c158835b830ccd52b867e6ab /src/editor.mjs | |
parent | fa0aef1fc56a4c09189c7594bcc09e6a9c7785aa (diff) |
fix: apply new layout name in editor
Diffstat (limited to 'src/editor.mjs')
-rw-r--r-- | src/editor.mjs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/editor.mjs b/src/editor.mjs index 43533c7..6d13816 100644 --- a/src/editor.mjs +++ b/src/editor.mjs | |||
@@ -15,7 +15,7 @@ const toggleEditing = () => { | |||
15 | } else { | 15 | } else { |
16 | document.body.setAttribute("data-layout", "editing") | 16 | document.body.setAttribute("data-layout", "editing") |
17 | } | 17 | } |
18 | HtmlContainer.setAttribute("data-layout", "none") | 18 | HtmlContainer.setAttribute("data-layout", "normal") |
19 | } | 19 | } |
20 | // }}} | 20 | // }}} |
21 | // Set up EasyMDE {{{ | 21 | // Set up EasyMDE {{{ |
@@ -559,7 +559,7 @@ document.onkeydown = (e) => { | |||
559 | // }}} | 559 | // }}} |
560 | const layoutObserver = new MutationObserver(() => { | 560 | const layoutObserver = new MutationObserver(() => { |
561 | const layout = HtmlContainer.getAttribute('data-layout') | 561 | const layout = HtmlContainer.getAttribute('data-layout') |
562 | if (layout !== 'none') { | 562 | if (layout !== 'normal') { |
563 | document.body.removeAttribute('data-layout') | 563 | document.body.removeAttribute('data-layout') |
564 | } | 564 | } |
565 | }) | 565 | }) |