1.0.0 • Published 6 months ago
code-mirror-night-owl v1.0.0
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,
});
API Reference
1.0.0
6 months ago