enhance(ux): up/down for the code type block

This commit is contained in:
charlie
2024-09-30 11:18:40 +08:00
parent d8bbea8ac2
commit ebe2d794cc
4 changed files with 28 additions and 17 deletions

View File

@@ -171,12 +171,13 @@
(state/set-editor-last-input-time! repo (util/time-ms))))
(defn- edit-block-aux
[repo block content text-range {:keys [container-id]}]
[repo block content text-range {:keys [container-id direction]}]
(when block
(let [container-id (or container-id
(state/get-current-editor-container-id)
:unknown-container)]
(state/set-editing! (str "edit-block-" (:block/uuid block)) content block text-range {:container-id container-id}))
(state/set-editing! (str "edit-block-" (:block/uuid block)) content block text-range
{:container-id container-id :direction direction}))
(mark-last-input-time! repo)))
(defn sanity-block-content