enhance: ESC on code back to raw editor

Also, removed :editor/pending-type-block.
This commit is contained in:
Tienson Qin
2024-10-03 17:16:41 +08:00
parent 5aaa3c111d
commit ccb6ee48e4
8 changed files with 232 additions and 262 deletions

View File

@@ -1536,3 +1536,10 @@ Arg *stop: atom, reset to true to stop the loop"
(js->clj)
(into {})
(walk/keywordize-keys)))))))
#?(:cljs
(defn get-cm-instance
[^js target]
(when target
(when-let [node (rec-get-node target "ls-code-editor-wrap")]
(some-> node (.querySelector ".CodeMirror") (.-CodeMirror))))))