enhance: use block dom node for editing instead of container

This commit is contained in:
Tienson Qin
2023-10-10 21:40:26 +08:00
parent e6b605e8e5
commit d9ab81e00d
11 changed files with 254 additions and 222 deletions

View File

@@ -444,7 +444,7 @@
(state/set-editor-last-pos! pos)))
:onStop (fn [_event]
(when-let [block (get @(get @state/state :editor/block) :block/uuid)]
(editor-handler/edit-block! block :max (:block/uuid block))
(editor-handler/edit-block! block :max nil)
(when-let [input (state/get-input)]
(when-let [saved-cursor (state/get-editor-last-pos)]
(cursor/move-cursor-to input saved-cursor)))))}