mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 02:16:30 +00:00
feat: add a shortcut for escape editing
This commit is contained in:
@@ -3015,3 +3015,13 @@
|
||||
(->> (all-blocks-with-level {:collapse? true})
|
||||
(map (comp gdom/getElementByClass str :block/uuid))
|
||||
state/exit-editing-and-set-selected-blocks!)))
|
||||
|
||||
(defn escape-editing
|
||||
([]
|
||||
(escape-editing true))
|
||||
([select?]
|
||||
(when (state/editing?)
|
||||
(if select?
|
||||
(->> (:block/uuid (state/get-edit-block))
|
||||
select-block!)
|
||||
(state/clear-edit!)))))
|
||||
|
||||
Reference in New Issue
Block a user