Skip to content

Commit 7858e89

Browse files
committed
Adjust readme usage section style
1 parent 830f40c commit 7858e89

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ conduct](http://contributor-covenant.org/version/1/1/0/) that applies
2020
to communication around the project.
2121

2222
# Usage
23-
```bash
24-
npm install @codemirror/theme-one-dark
25-
```
2623

27-
```js
28-
import { oneDark } from '@codemirror/theme-one-dark'
24+
```javascript
25+
import {EditorView, basicSetup} from "codemirror"
26+
import {oneDark} from "@codemirror/theme-one-dark"
2927

3028
const editor = new EditorView({
31-
extensions: [oneDark]
29+
parent: document.body,
30+
doc: "One Dark Theme",
31+
extensions: [basicSetup, oneDark]
3232
})
3333
```
3434

0 commit comments

Comments
 (0)