feat: esc select block

This commit is contained in:
Weihua Lu
2021-04-19 15:19:12 +08:00
parent fa4708ed02
commit 0b2351883b
2 changed files with 8 additions and 1 deletions

View File

@@ -863,6 +863,13 @@
(state/set-selection-blocks! blocks direction)
(util/select-highlight! blocks)))
(defn select-block!
[block-uuid]
(when-let [block (-> (str block-uuid)
(js/document.getElementsByClassName)
first)]
(exit-editing-and-set-selected-blocks! [block])))
(defn select-all-blocks!
[]
(when-let [current-input-id (state/get-edit-input-id)]