mirror of https://github.com/logseq/logseq
Set CodeMirror mode when editing files
parent
f2fc65bb36
commit
9e3702bd8c
|
@ -121,9 +121,10 @@
|
|||
|
||||
(and format (contains? (config/text-formats) format))
|
||||
(when-let [file-content (db/get-file path)]
|
||||
(let [content (string/trim file-content)]
|
||||
(let [content (string/trim file-content)
|
||||
mode (util/get-file-ext path)]
|
||||
(lazy-editor/editor {:file? true
|
||||
:file-path path} path nil content nil)))
|
||||
:file-path path} path {:data-lang mode} content nil)))
|
||||
|
||||
:else
|
||||
[:div (tongue :file/format-not-supported (name format))])])))
|
||||
|
|
Loading…
Reference in New Issue