enhance(ux): polish workflow for the code type block

This commit is contained in:
charlie
2024-09-27 14:34:22 +08:00
parent d02488de2b
commit ca08ba94e1
5 changed files with 72 additions and 46 deletions

View File

@@ -164,6 +164,7 @@
:editor/cursor-range (atom nil)
:editor/container-id (atom nil)
:editor/next-edit-block (atom nil)
:editor/pending-type-block {}
:selection/mode (atom false)
;; Warning: blocks order is determined when setting this attribute
@@ -2398,6 +2399,12 @@ Similar to re-frame subscriptions"
[]
(:ui/handbooks-open? @state))
(defn set-pending-type-block!
[block]
(when block
(set-state! :editor/pending-type-block
{:block block :at (js/Date.now)})))
(defn get-handbook-route-chan
[]
(:handbook/route-chan @state))