code-mirror-night-owl
v1.0.0
Published
Night Owl theme for code mirror 6.
Downloads
3
Readme
code-mirror-night-owl
Night Owl Theme for codemirror 6, based on the Night Owl VS Code theme.
Install
npm install code-mirror-night-owl
Usage
Basic setup
import { EditorState } from "@codemirror/state";
import { EditorView } from "@codemirror/view";
import { javascript } from "@codemirror/lang-javascript";
import { nightOwl } from "code-mirror-night-owl/night-owl";
const state = EditorState.create({
doc: "my source code",
extensions: [javascript(), nightOwl],
});
const view = new EditorView({
parent: document.querySelector("#editor"),
state,
});
Light theme
import { EditorState } from "@codemirror/state";
import { EditorView } from "@codemirror/view";
import { javascript } from "@codemirror/lang-javascript";
import { nightOwlLight } from "code-mirror-night-owl/night-owl-light";
const state = EditorState.create({
doc: "my source code",
extensions: [javascript(), nightOwl],
});
const view = new EditorView({
parent: document.querySelector("#editor"),
state,
});