mirror of
https://github.com/logseq/logseq.git
synced 2026-05-04 02:46:45 +00:00
enhance: type ``` and press Enter to switch to codemirror
This commit is contained in:
@@ -688,7 +688,6 @@
|
||||
|
||||
(defn drop-last-selection-block!
|
||||
[]
|
||||
(def blocks (:selection/blocks @state))
|
||||
(let [last-block (peek (vec (:selection/blocks @state)))]
|
||||
(swap! state assoc
|
||||
:selection/mode true
|
||||
@@ -874,6 +873,12 @@
|
||||
:editor/block nil
|
||||
:cursor-range nil}))
|
||||
|
||||
(defn into-code-editor-mode!
|
||||
[]
|
||||
(swap! state merge {:editor/editing? nil
|
||||
:cursor-range nil
|
||||
:editor/code-mode? true}))
|
||||
|
||||
(defn set-last-pos!
|
||||
[new-pos]
|
||||
(set-state! :editor/last-saved-cursor new-pos))
|
||||
|
||||
Reference in New Issue
Block a user