chore: disable buggy codemirror integration temporally

This commit is contained in:
Tienson Qin
2021-05-09 22:03:05 +08:00
parent 762f5eff85
commit e6d6c940e1
2 changed files with 17 additions and 6 deletions

View File

@@ -2164,12 +2164,14 @@
:else
(let [language (if (contains? #{"edn" "clj" "cljc" "cljs" "clojure"} language) "text/x-clojure" language)]
(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))])))))
(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))])
))))
:else
"")

View File

@@ -70,6 +70,7 @@
:github/contents {}
:config {}
:editor/code-mode? false
:editor/show-page-search? false
:editor/show-page-search-hashtag? false
:editor/show-date-picker? false
@@ -1199,6 +1200,14 @@
[args]
(set-state! :editor/args args))
(defn code-mode?
[]
(:editor/code-mode? @state))
(defn go-to-code-mode!
[]
(set-state! :editor/code-mode? true))
(defn get-editor-args
[]
(:editor/args @state))