enhance: editor experience

1. back to use container id + editing block id instead of block dom
ref to decide which block is in editing, to simplify edit-block! and
reduce browser gc.
2. set next editing block ahead of receiving the data changes from db
worker, so the editor feels a bit faster.
This commit is contained in:
Tienson Qin
2024-04-08 21:10:12 +08:00
parent cd38e0b9f9
commit 2d5eb0f79f
19 changed files with 229 additions and 393 deletions

View File

@@ -380,7 +380,7 @@
(code-handler/save-code-editor!)
(when-let [block-id (:block/uuid config)]
(let [block (db/pull [:block/uuid block-id])]
(editor-handler/edit-block! block :max block-id)))))
(editor-handler/edit-block! block :max)))))
(defn render!
[state]