fix: inserting some weird characters on plain text and code blocks

close #2042
close #2037
This commit is contained in:
Tienson Qin
2021-05-30 11:14:02 +08:00
parent 2d9096d06f
commit 43d00d677d
4 changed files with 180 additions and 289 deletions

View File

@@ -107,7 +107,8 @@
(defn render!
[state]
(let [editor-atom (:editor-atom state)
esc-pressed? (atom nil)]
esc-pressed? (atom nil)
dark? (state/dark?)]
(if @editor-atom
(let [editor @editor-atom
doc (.getDoc editor)
@@ -126,6 +127,7 @@
(when textarea
(from-textarea textarea
#js {:mode mode
:theme (if dark? "solarized dark" "solarized")
:matchBrackets lisp?
:autoCloseBrackets true
:lineNumbers true