fix: disable global editing bindings when in block component editing

for example, codemirror, excalidraw modes
This commit is contained in:
Tienson Qin
2021-05-16 12:02:03 +08:00
parent 91ce40242a
commit c9943eb680
7 changed files with 32 additions and 18 deletions

View File

@@ -2193,14 +2193,12 @@
:else
(let [language (if (contains? #{"edn" "clj" "cljc" "cljs" "clojure"} language) "text/x-clojure" language)]
(highlight/highlight (str (medley/random-uuid)) {:data-lang language} code)
;; (if (:slide? config)
;; (highlight/highlight (str (medley/random-uuid)) {:data-lang language} code)
;; [:div
;; (lazy-editor/editor config (str (dc/squuid)) attr code pos_meta)
;; (when (and (= language "text/x-clojure") (contains? (set options) ":results"))
;; (sci/eval-result code))])
))))
(if (:slide? config)
(highlight/highlight (str (medley/random-uuid)) {:data-lang language} code)
[:div
(lazy-editor/editor config (str (dc/squuid)) attr code pos_meta)
(when (and (= language "text/x-clojure") (contains? (set options) ":results"))
(sci/eval-result code))])))))
:else
"")