Skip to content

Commit 34ba805

Browse files
committedMar 26, 2024·
doc(theme): update document.
1 parent e16e45a commit 34ba805

File tree

36 files changed

+476
-17
lines changed

36 files changed

+476
-17
lines changed
 

‎themes/abcdef/README.md

+14
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,21 @@
1717
npm install @uiw/codemirror-theme-abcdef --save
1818
```
1919

20+
```js
21+
import { EditorState } from '@codemirror/state';
22+
import { javascript } from '@codemirror/lang-javascript';
23+
import { abcdef } from '@uiw/codemirror-theme-abcdef';
24+
25+
const state = EditorState.create({
26+
doc: 'my source code',
27+
extensions: [abcdef, javascript({ jsx: true })],
28+
});
29+
```
30+
31+
Using in React:
32+
2033
```jsx
34+
import CodeMirror from '@uiw/react-codemirror';
2135
import { tags as t } from '@lezer/highlight';
2236
import { abcdef, abcdefInit } from '@uiw/codemirror-theme-abcdef';
2337

‎themes/abyss/README.md

+14
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,21 @@ Abyss theme for cm6, generated from [vscode themes](https://github.com/microsoft
1919
npm install @uiw/codemirror-theme-abyss --save
2020
```
2121

22+
```js
23+
import { EditorState } from '@codemirror/state';
24+
import { javascript } from '@codemirror/lang-javascript';
25+
import { abyss } from '@uiw/codemirror-theme-abyss';
26+
27+
const state = EditorState.create({
28+
doc: 'my source code',
29+
extensions: [abyss, javascript({ jsx: true })],
30+
});
31+
```
32+
33+
Using in React:
34+
2235
```jsx
36+
import CodeMirror from '@uiw/react-codemirror';
2337
import { abyss, abyssInit } from '@uiw/codemirror-theme-abyss';
2438

2539
<CodeMirror theme={abyss} />

‎themes/all/README.md

+19-17
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,25 @@ import * as themes from '@uiw/codemirror-themes-all';
2121

2222
## Usage
2323

24+
```js
25+
import { EditorView } from '@codemirror/view';
26+
import { EditorState } from '@codemirror/state';
27+
import { javascript } from '@codemirror/lang-javascript';
28+
import { abcdef } from '@uiw/codemirror-themes-all';
29+
30+
const state = EditorState.create({
31+
doc: 'my source code',
32+
extensions: [abcdef, javascript({ jsx: true })],
33+
});
34+
35+
const view = new EditorView({
36+
parent: document.querySelector('#editor'),
37+
state,
38+
});
39+
```
40+
41+
Using in React:
42+
2443
```jsx
2544
import CodeMirror from '@uiw/react-codemirror';
2645
import { abcdef } from '@uiw/codemirror-themes-all';
@@ -42,23 +61,6 @@ function App() {
4261
export default App;
4362
```
4463

45-
```js
46-
import { EditorView } from '@codemirror/view';
47-
import { EditorState } from '@codemirror/state';
48-
import { javascript } from '@codemirror/lang-javascript';
49-
import { abcdef } from '@uiw/codemirror-themes-all';
50-
51-
const state = EditorState.create({
52-
doc: 'my source code',
53-
extensions: [abcdef, javascript({ jsx: true })],
54-
});
55-
56-
const view = new EditorView({
57-
parent: document.querySelector('#editor'),
58-
state,
59-
});
60-
```
61-
6264
## API
6365

6466
```ts

‎themes/androidstudio/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@
1717
npm install @uiw/codemirror-theme-androidstudio --save
1818
```
1919

20+
```js
21+
import { EditorState } from '@codemirror/state';
22+
import { javascript } from '@codemirror/lang-javascript';
23+
import { androidstudio } from '@uiw/codemirror-theme-androidstudio';
24+
25+
const state = EditorState.create({
26+
doc: 'my source code',
27+
extensions: [androidstudio, javascript({ jsx: true })],
28+
});
29+
```
30+
31+
Using in React:
32+
2033
```jsx
2134
import { tags as t } from '@lezer/highlight';
2235
import { androidstudio, androidstudioInit } from '@uiw/codemirror-theme-androidstudio';

‎themes/andromeda/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ Andromeda theme for cm6, generated from [vscode themes](https://github.com/Elive
1919
npm install @uiw/codemirror-theme-andromeda --save
2020
```
2121

22+
```js
23+
import { EditorState } from '@codemirror/state';
24+
import { javascript } from '@codemirror/lang-javascript';
25+
import { andromeda } from '@uiw/codemirror-theme-andromeda';
26+
27+
const state = EditorState.create({
28+
doc: 'my source code',
29+
extensions: [andromeda, javascript({ jsx: true })],
30+
});
31+
```
32+
33+
Using in React:
34+
2235
```jsx
2336
import { andromeda, andromedaInit } from '@uiw/codemirror-theme-andromeda';
2437

‎themes/atomone/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@
1717
npm install @uiw/codemirror-theme-atomone --save
1818
```
1919

20+
```js
21+
import { EditorState } from '@codemirror/state';
22+
import { javascript } from '@codemirror/lang-javascript';
23+
import { atomone } from '@uiw/codemirror-theme-atomone';
24+
25+
const state = EditorState.create({
26+
doc: 'my source code',
27+
extensions: [atomone, javascript({ jsx: true })],
28+
});
29+
```
30+
31+
Using in React:
32+
2033
```jsx
2134
import { tags as t } from '@lezer/highlight';
2235
import { atomone, atomoneInit } from '@uiw/codemirror-theme-atomone';

‎themes/aura/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@
1717
npm install @uiw/codemirror-theme-aura --save
1818
```
1919

20+
```js
21+
import { EditorState } from '@codemirror/state';
22+
import { javascript } from '@codemirror/lang-javascript';
23+
import { aura } from '@uiw/codemirror-theme-aura';
24+
25+
const state = EditorState.create({
26+
doc: 'my source code',
27+
extensions: [aura, javascript({ jsx: true })],
28+
});
29+
```
30+
31+
Using in React:
32+
2033
```jsx
2134
import { tags as t } from '@lezer/highlight';
2235
import { aura, auraInit } from '@uiw/codemirror-theme-aura';

‎themes/basic/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@
2121
npm install @uiw/codemirror-theme-basic --save
2222
```
2323

24+
```js
25+
import { EditorState } from '@codemirror/state';
26+
import { javascript } from '@codemirror/lang-javascript';
27+
import { basicLight, basicDark } from '@uiw/codemirror-theme-basic';
28+
29+
const state = EditorState.create({
30+
doc: 'my source code',
31+
extensions: [basicDark, javascript({ jsx: true })],
32+
});
33+
```
34+
35+
Using in React:
36+
2437
```jsx
2538
import { basicLight, basicLightInit, basicDark, basicDarkInit } from '@uiw/codemirror-theme-basic';
2639
// Or

‎themes/bbedit/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@
1717
npm install @uiw/codemirror-theme-bbedit --save
1818
```
1919

20+
```js
21+
import { EditorState } from '@codemirror/state';
22+
import { javascript } from '@codemirror/lang-javascript';
23+
import { bbedit } from '@uiw/codemirror-theme-bbedit';
24+
25+
const state = EditorState.create({
26+
doc: 'my source code',
27+
extensions: [bbedit, javascript({ jsx: true })],
28+
});
29+
```
30+
31+
Using in React:
32+
2033
```jsx
2134
import { tags as t } from '@lezer/highlight';
2235
import { bbedit, bbeditInit } from '@uiw/codemirror-theme-bbedit';

‎themes/bespin/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@
1717
npm install @uiw/codemirror-theme-bespin --save
1818
```
1919

20+
```js
21+
import { EditorState } from '@codemirror/state';
22+
import { javascript } from '@codemirror/lang-javascript';
23+
import { bespin } from '@uiw/codemirror-theme-bespin';
24+
25+
const state = EditorState.create({
26+
doc: 'my source code',
27+
extensions: [bespin, javascript({ jsx: true })],
28+
});
29+
```
30+
31+
Using in React:
32+
2033
```jsx
2134
import { tags as t } from '@lezer/highlight';
2235
import { bespin, bespinInit } from '@uiw/codemirror-theme-bespin';

‎themes/console/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,19 @@ One of the usages for react-codemirror is a logger component, but there is no th
2525
npm install @uiw/codemirror-theme-console --save
2626
```
2727

28+
```js
29+
import { EditorState } from '@codemirror/state';
30+
import { javascript } from '@codemirror/lang-javascript';
31+
import { consoleLight, consoleDark } from '@uiw/codemirror-theme-console';
32+
33+
const state = EditorState.create({
34+
doc: 'my source code',
35+
extensions: [consoleDark],
36+
});
37+
```
38+
39+
Using in React:
40+
2841
```jsx
2942
import { consoleLight, consoleLightInit, consoleDark, consoleDarkInit } from '@uiw/codemirror-theme-console';
3043
// Or

‎themes/copilot/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ Copilot theme for cm6, generated from [copilot-theme](https://github.com/benjami
1919
npm install @uiw/codemirror-theme-copilot --save
2020
```
2121

22+
```js
23+
import { EditorState } from '@codemirror/state';
24+
import { javascript } from '@codemirror/lang-javascript';
25+
import { copilot } from '@uiw/codemirror-theme-copilot';
26+
27+
const state = EditorState.create({
28+
doc: 'my source code',
29+
extensions: [copilot, javascript({ jsx: true })],
30+
});
31+
```
32+
33+
Using in React:
34+
2235
```jsx
2336
import { copilot, copilotInit } from '@uiw/codemirror-theme-copilot';
2437

‎themes/darcula/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@
1717
npm install @uiw/codemirror-theme-darcula --save
1818
```
1919

20+
```js
21+
import { EditorState } from '@codemirror/state';
22+
import { javascript } from '@codemirror/lang-javascript';
23+
import { darcula } from '@uiw/codemirror-theme-darcula';
24+
25+
const state = EditorState.create({
26+
doc: 'my source code',
27+
extensions: [darcula, javascript({ jsx: true })],
28+
});
29+
```
30+
31+
Using in React:
32+
2033
```jsx
2134
import { tags as t } from '@lezer/highlight';
2235
import { darcula, darculaInit } from '@uiw/codemirror-theme-darcula';

‎themes/dracula/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@
1717
npm install @uiw/codemirror-theme-dracula --save
1818
```
1919

20+
```js
21+
import { EditorState } from '@codemirror/state';
22+
import { javascript } from '@codemirror/lang-javascript';
23+
import { dracula } from '@uiw/codemirror-theme-dracula';
24+
25+
const state = EditorState.create({
26+
doc: 'my source code',
27+
extensions: [dracula, javascript({ jsx: true })],
28+
});
29+
```
30+
31+
Using in React:
32+
2033
```jsx
2134
import { tags as t } from '@lezer/highlight';
2235
import { dracula, draculaInit } from '@uiw/codemirror-theme-dracula';

‎themes/duotone/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@
2121
npm install @uiw/codemirror-theme-duotone --save
2222
```
2323

24+
```js
25+
import { EditorState } from '@codemirror/state';
26+
import { javascript } from '@codemirror/lang-javascript';
27+
import { duotoneLight, duotoneDark } from '@uiw/codemirror-theme-duotone';
28+
29+
const state = EditorState.create({
30+
doc: 'my source code',
31+
extensions: [duotoneDark, javascript({ jsx: true })],
32+
});
33+
```
34+
35+
Using in React:
36+
2437
```jsx
2538
import { duotoneLight, duotoneLightInit, duotoneDark, duotoneDarkInit } from '@uiw/codemirror-theme-duotone';
2639

‎themes/eclipse/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@
1717
npm install @uiw/codemirror-theme-eclipse --save
1818
```
1919

20+
```js
21+
import { EditorState } from '@codemirror/state';
22+
import { javascript } from '@codemirror/lang-javascript';
23+
import { eclipse } from '@uiw/codemirror-theme-eclipse';
24+
25+
const state = EditorState.create({
26+
doc: 'my source code',
27+
extensions: [eclipse, javascript({ jsx: true })],
28+
});
29+
```
30+
31+
Using in React:
32+
2033
```jsx
2134
import { defaultSettingsEclipse } from '@uiw/codemirror-theme-eclipse';
2235
import { eclipse, eclipseInit } from '@uiw/codemirror-theme-eclipse';

‎themes/github/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@
2121
npm install @uiw/codemirror-theme-github --save
2222
```
2323

24+
```js
25+
import { EditorState } from '@codemirror/state';
26+
import { javascript } from '@codemirror/lang-javascript';
27+
import { githubLight, githubDark } from '@uiw/codemirror-theme-github';
28+
29+
const state = EditorState.create({
30+
doc: 'my source code',
31+
extensions: [githubDark, javascript({ jsx: true })],
32+
});
33+
```
34+
35+
Using in React:
36+
2437
```jsx
2538
import { githubLight, githubLightInit, githubDark, githubDarkInit } from '@uiw/codemirror-theme-github';
2639

‎themes/gruvbox/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ This package implements the [gruvbox](https://github.com/morhetz/gruvbox) light
2323
npm install @uiw/codemirror-theme-gruvbox-dark --save
2424
```
2525

26+
```js
27+
import { EditorState } from '@codemirror/state';
28+
import { javascript } from '@codemirror/lang-javascript';
29+
import { gruvboxDark } from '@uiw/codemirror-theme-gruvbox-dark';
30+
31+
const state = EditorState.create({
32+
doc: 'my source code',
33+
extensions: [gruvboxDark, javascript({ jsx: true })],
34+
});
35+
```
36+
37+
Using in React:
38+
2639
```jsx
2740
import { gruvboxDark, gruvboxDarkInit, gruvboxLight, gruvboxLightInit } from '@uiw/codemirror-theme-nord';
2841

‎themes/kimbie/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ Kimbie theme for cm6, generated from [vscode themes](https://github.com/microsof
1919
npm install @uiw/codemirror-theme-kimbie --save
2020
```
2121

22+
```js
23+
import { EditorState } from '@codemirror/state';
24+
import { javascript } from '@codemirror/lang-javascript';
25+
import { kimbie } from '@uiw/codemirror-theme-kimbie';
26+
27+
const state = EditorState.create({
28+
doc: 'my source code',
29+
extensions: [kimbie, javascript({ jsx: true })],
30+
});
31+
```
32+
33+
Using in React:
34+
2235
```jsx
2336
import { kimbie, kimbieInit } from '@uiw/codemirror-theme-kimbie';
2437

‎themes/material/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ This package implements the [Material](https://material.io/tools/color/) Dark th
2323
npm install @uiw/codemirror-theme-material --save
2424
```
2525

26+
```js
27+
import { EditorState } from '@codemirror/state';
28+
import { javascript } from '@codemirror/lang-javascript';
29+
import { material } from '@uiw/codemirror-theme-material';
30+
31+
const state = EditorState.create({
32+
doc: 'my source code',
33+
extensions: [material, javascript({ jsx: true })],
34+
});
35+
```
36+
37+
Using in React:
38+
2639
```jsx
2740
import { materialDark, materialDarkInit, materialLight, materialLightInit } from '@uiw/codemirror-theme-material';
2841

‎themes/monokai-dimmed/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ MonokaiDimmed theme for cm6, generated from [vscode themes](https://github.com/m
1919
npm install @uiw/codemirror-theme-monokai-dimmed --save
2020
```
2121

22+
```js
23+
import { EditorState } from '@codemirror/state';
24+
import { javascript } from '@codemirror/lang-javascript';
25+
import { monokaiDimmed } from '@uiw/codemirror-theme-monokai-dimmed';
26+
27+
const state = EditorState.create({
28+
doc: 'my source code',
29+
extensions: [monokaiDimmed, javascript({ jsx: true })],
30+
});
31+
```
32+
33+
Using in React:
34+
2235
```jsx
2336
import { monokaiDimmed, monokaiDimmedInit } from '@uiw/codemirror-theme-monokai-dimmed';
2437

‎themes/monokai/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ Monokai theme for cm6, generated from [vscode themes](https://github.com/microso
1919
npm install @uiw/codemirror-theme-monokai --save
2020
```
2121

22+
```js
23+
import { EditorState } from '@codemirror/state';
24+
import { javascript } from '@codemirror/lang-javascript';
25+
import { monokai } from '@uiw/codemirror-theme-monokai';
26+
27+
const state = EditorState.create({
28+
doc: 'my source code',
29+
extensions: [monokai, javascript({ jsx: true })],
30+
});
31+
```
32+
33+
Using in React:
34+
2235
```jsx
2336
import { monokai, monokaiInit } from '@uiw/codemirror-theme-monokai';
2437

‎themes/noctis-lilac/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ This package implements the noctis-lilac for the CodeMirror code editor.
1919
npm install @uiw/codemirror-theme-noctis-lilac --save
2020
```
2121

22+
```js
23+
import { EditorState } from '@codemirror/state';
24+
import { javascript } from '@codemirror/lang-javascript';
25+
import { noctisLilac } from '@uiw/codemirror-theme-noctis-lilac';
26+
27+
const state = EditorState.create({
28+
doc: 'my source code',
29+
extensions: [noctisLilac, javascript({ jsx: true })],
30+
});
31+
```
32+
33+
Using in React:
34+
2235
```jsx
2336
import { noctisLilac, noctisLilacInit } from '@uiw/codemirror-theme-noctis-lilac';
2437

‎themes/nord/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ This package implements the [nord theme](https://www.nordtheme.com/) for the Cod
1919
npm install @uiw/codemirror-theme-nord --save
2020
```
2121

22+
```js
23+
import { EditorState } from '@codemirror/state';
24+
import { javascript } from '@codemirror/lang-javascript';
25+
import { nord } from '@uiw/codemirror-theme-nord';
26+
27+
const state = EditorState.create({
28+
doc: 'my source code',
29+
extensions: [nord, javascript({ jsx: true })],
30+
});
31+
```
32+
33+
Using in React:
34+
2235
```jsx
2336
import { nord, nordInit } from '@uiw/codemirror-theme-nord';
2437

‎themes/okaidia/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@
1717
npm install @uiw/codemirror-theme-okaidia --save
1818
```
1919

20+
```js
21+
import { EditorState } from '@codemirror/state';
22+
import { javascript } from '@codemirror/lang-javascript';
23+
import { okaidia } from '@uiw/codemirror-theme-okaidia';
24+
25+
const state = EditorState.create({
26+
doc: 'my source code',
27+
extensions: [okaidia, javascript({ jsx: true })],
28+
});
29+
```
30+
31+
Using in React:
32+
2033
```jsx
2134
import { okaidia, okaidiaInit } from '@uiw/codemirror-theme-okaidia';
2235

‎themes/quietlight/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ Quietlight theme for cm6, generated from [vscode themes](https://github.com/micr
1919
npm install @uiw/codemirror-theme-quietlight --save
2020
```
2121

22+
```js
23+
import { EditorState } from '@codemirror/state';
24+
import { javascript } from '@codemirror/lang-javascript';
25+
import { quietlight } from '@uiw/codemirror-theme-quietlight';
26+
27+
const state = EditorState.create({
28+
doc: 'my source code',
29+
extensions: [quietlight, javascript({ jsx: true })],
30+
});
31+
```
32+
33+
Using in React:
34+
2235
```jsx
2336
import { quietlight, quietlightInit } from '@uiw/codemirror-theme-quietlight';
2437

‎themes/red/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ Red theme for cm6, generated from [vscode themes](https://github.com/microsoft/v
1919
npm install @uiw/codemirror-theme-red --save
2020
```
2121

22+
```js
23+
import { EditorState } from '@codemirror/state';
24+
import { javascript } from '@codemirror/lang-javascript';
25+
import { red } from '@uiw/codemirror-theme-red';
26+
27+
const state = EditorState.create({
28+
doc: 'my source code',
29+
extensions: [red, javascript({ jsx: true })],
30+
});
31+
```
32+
33+
Using in React:
34+
2235
```jsx
2336
import { red, redInit } from '@uiw/codemirror-theme-red';
2437

‎themes/solarized/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ This package implements the [Solarized](https://ethanschoonover.com/solarized/)
2323
npm install @uiw/codemirror-theme-solarized --save
2424
```
2525

26+
```js
27+
import { EditorState } from '@codemirror/state';
28+
import { javascript } from '@codemirror/lang-javascript';
29+
import { solarizedLight, solarizedDark } from '@uiw/codemirror-theme-solarized';
30+
31+
const state = EditorState.create({
32+
doc: 'my source code',
33+
extensions: [solarizedLight, javascript({ jsx: true })],
34+
});
35+
```
36+
37+
Using in React:
38+
2639
```jsx
2740
import { solarizedLight, solarizedLightInit, solarizedDark, solarizedDarkInit } from '@uiw/codemirror-theme-solarized';
2841
// Or

‎themes/sublime/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@
1717
npm install @uiw/codemirror-theme-sublime --save
1818
```
1919

20+
```js
21+
import { EditorState } from '@codemirror/state';
22+
import { javascript } from '@codemirror/lang-javascript';
23+
import { sublime } from '@uiw/codemirror-theme-sublime';
24+
25+
const state = EditorState.create({
26+
doc: 'my source code',
27+
extensions: [sublime, javascript({ jsx: true })],
28+
});
29+
```
30+
31+
Using in React:
32+
2033
```jsx
2134
import { sublime, sublimeInit } from '@uiw/codemirror-theme-sublime';
2235

‎themes/tokyo-night-day/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@
1717
npm install @uiw/codemirror-theme-tokyo-night-day --save
1818
```
1919

20+
```js
21+
import { EditorState } from '@codemirror/state';
22+
import { javascript } from '@codemirror/lang-javascript';
23+
import { tokyoNightDay } from '@uiw/codemirror-theme-tokyo-night-day';
24+
25+
const state = EditorState.create({
26+
doc: 'my source code',
27+
extensions: [tokyoNightDay, javascript({ jsx: true })],
28+
});
29+
```
30+
31+
Using in React:
32+
2033
```jsx
2134
import { tags as t } from '@lezer/highlight';
2235
import { tokyoNightDay, tokyoNightDayInit } from '@uiw/codemirror-theme-tokyo-night-day';

‎themes/tokyo-night-storm/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@
1717
npm install @uiw/codemirror-theme-tokyo-night-storm --save
1818
```
1919

20+
```js
21+
import { EditorState } from '@codemirror/state';
22+
import { javascript } from '@codemirror/lang-javascript';
23+
import { tokyoNightStorm } from '@uiw/codemirror-theme-tokyo-night-storm';
24+
25+
const state = EditorState.create({
26+
doc: 'my source code',
27+
extensions: [tokyoNightStorm, javascript({ jsx: true })],
28+
});
29+
```
30+
31+
Using in React:
32+
2033
```jsx
2134
import { tags as t } from '@lezer/highlight';
2235
import { tokyoNightStorm, tokyoNightStormInit } from '@uiw/codemirror-theme-tokyo-night-storm';

‎themes/tokyo-night/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@
1717
npm install @uiw/codemirror-theme-tokyo-night --save
1818
```
1919

20+
```js
21+
import { EditorState } from '@codemirror/state';
22+
import { javascript } from '@codemirror/lang-javascript';
23+
import { tokyoNight } from '@uiw/codemirror-theme-tokyo-night';
24+
25+
const state = EditorState.create({
26+
doc: 'my source code',
27+
extensions: [tokyoNight, javascript({ jsx: true })],
28+
});
29+
```
30+
31+
Using in React:
32+
2033
```jsx
2134
import { tags as t } from '@lezer/highlight';
2235
import { tokyoNight, tokyoNightInit } from '@uiw/codemirror-theme-tokyo-night';

‎themes/tomorrow-night-blue/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ TomorrowNightBlue theme for cm6, generated from [vscode themes](https://github.c
1919
npm install @uiw/codemirror-theme-tomorrow-night-blue --save
2020
```
2121

22+
```js
23+
import { EditorState } from '@codemirror/state';
24+
import { javascript } from '@codemirror/lang-javascript';
25+
import { tomorrowNightBlue } from '@uiw/codemirror-theme-tomorrow-night-blue';
26+
27+
const state = EditorState.create({
28+
doc: 'my source code',
29+
extensions: [tomorrowNightBlue, javascript({ jsx: true })],
30+
});
31+
```
32+
33+
Using in React:
34+
2235
```jsx
2336
import { tomorrowNightBlue, tomorrowNightBlueInit } from '@uiw/codemirror-theme-tomorrow-night-blue';
2437

‎themes/vscode/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@
1717
npm install @uiw/codemirror-theme-vscode --save
1818
```
1919

20+
```js
21+
import { EditorState } from '@codemirror/state';
22+
import { javascript } from '@codemirror/lang-javascript';
23+
import { vscodeDark } from '@uiw/codemirror-theme-vscode';
24+
25+
const state = EditorState.create({
26+
doc: 'my source code',
27+
extensions: [vscodeDark, javascript({ jsx: true })],
28+
});
29+
```
30+
31+
Using in React:
32+
2033
```jsx
2134
import { vscodeDark, vscodeDarkInit } from '@uiw/codemirror-theme-vscode';
2235

‎themes/white/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ White theme for cm6, generated from [white-theme](https://github.com/xthezealot/
2323
npm install @uiw/codemirror-theme-white --save
2424
```
2525

26+
```js
27+
import { EditorState } from '@codemirror/state';
28+
import { javascript } from '@codemirror/lang-javascript';
29+
import { whiteDark, whiteDarkInit } from '@uiw/codemirror-theme-white/dark';
30+
31+
const state = EditorState.create({
32+
doc: 'my source code',
33+
extensions: [whiteDark, javascript({ jsx: true })],
34+
});
35+
```
36+
37+
Using in React:
38+
2639
```jsx
2740
import { whiteLight, whiteLightInit, whiteDark, whiteDarkInit } from '@uiw/codemirror-theme-white';
2841
// Or

‎themes/xcode/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@
2121
npm install @uiw/codemirror-theme-xcode --save
2222
```
2323

24+
```js
25+
import { EditorState } from '@codemirror/state';
26+
import { javascript } from '@codemirror/lang-javascript';
27+
import { xcodeLight, xcodeDark } from '@uiw/codemirror-theme-xcode';
28+
29+
const state = EditorState.create({
30+
doc: 'my source code',
31+
extensions: [xcodeDark, javascript({ jsx: true })],
32+
});
33+
```
34+
35+
Using in React:
36+
2437
```jsx
2538
import { xcodeLight, xcodeLightInit, xcodeDark, xcodeDarkInit } from '@uiw/codemirror-theme-xcode';
2639

0 commit comments

Comments
 (0)
Please sign in to comment.