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

@@ -453,7 +453,7 @@
(util/stop e)
(state/clear-selection!)
(when-let [block (and (:block/uuid config) (into {} (db/get-block-by-uuid (:block/uuid config))))]
(state/set-editing! id (.getValue editor) block nil false))))
(state/set-editing! id (.getValue editor) block nil {:move-cursor? false}))))
(.addEventListener element "touchstart"
(fn [e]
(.stopPropagation e)))