minor fixes
This commit is contained in:
parent
40c00fc12b
commit
fa9124381c
@ -1,9 +1,7 @@
|
|||||||
import { useRef, useEffect } from "react";
|
import { useRef, useEffect } from "react";
|
||||||
import { EditorState } from "@codemirror/state";
|
import { EditorState } from "@codemirror/state";
|
||||||
import { EditorView, keymap, lineNumbers } from "@codemirror/view";
|
import { EditorView, keymap, lineNumbers } from "@codemirror/view";
|
||||||
import { espresso } from "thememirror";
|
import { espresso, cobalt } from "thememirror";
|
||||||
import { cobalt } from "thememirror";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
defaultKeymap,
|
defaultKeymap,
|
||||||
history,
|
history,
|
||||||
@ -28,7 +26,6 @@ function CodeMirror({ code, editorTheme }: Props) {
|
|||||||
if (editorTheme === "espresso") {
|
if (editorTheme === "espresso") {
|
||||||
selectedTheme = espresso;
|
selectedTheme = espresso;
|
||||||
}
|
}
|
||||||
|
|
||||||
view.current = new EditorView({
|
view.current = new EditorView({
|
||||||
state: EditorState.create({
|
state: EditorState.create({
|
||||||
doc: code,
|
doc: code,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user