|
12 | 12 |
|
13 | 13 | [CodeMirror(6)](https://codemirror.net/6/docs/) component for Vue(3).
|
14 | 14 |
|
15 |
| -[**Example site**](https://github.surmon.me/vue-codemirror) |
| 15 | +[**Example Site**](https://github.surmon.me/vue-codemirror) |
16 | 16 |
|
17 |
| -### Documentation |
| 17 | +#### Legacy version |
| 18 | + |
| 19 | +- [Examples (Vue2)](https://v1.github.surmon.me/vue-codemirror) |
| 20 | +- [[email protected] (Vue2 / CodeMirror5) ](https://github.com/surmon-china/vue-codemirror/tree/v4.0.0) |
| 21 | + |
| 22 | +--- |
| 23 | + |
| 24 | +#### Documentation |
18 | 25 |
|
19 | 26 | - [CodeMirror6 Guide](https://codemirror.net/6/docs/guide/)
|
20 | 27 | - [CodeMirror6 APIs](https://codemirror.net/6/docs/ref/)
|
|
23 | 30 | - [CodeMirror6 Example: Styling](https://codemirror.net/6/examples/styling/)
|
24 | 31 | - [CodeMirror Forum](https://discuss.codemirror.net/)
|
25 | 32 |
|
26 |
| -### CodeMirror packages |
| 33 | +#### CodeMirror packages |
27 | 34 |
|
28 | 35 | - [CodeMirror6 Languages](https://github.com/orgs/codemirror/repositories?q=lang-&type=all)
|
29 | 36 | - [CodeMirror6 Themes](https://github.com/orgs/codemirror/repositories?q=theme&type=all)
|
30 | 37 |
|
31 | 38 | ---
|
32 | 39 |
|
33 |
| -### Legacy version |
34 |
| - |
35 |
| -- [Examples (Vue2)](https://v1.github.surmon.me/vue-codemirror) |
36 |
| -- [[email protected] (Vue2 / CodeMirror5) ](https://github.com/surmon-china/vue-codemirror/tree/v4.0.0) |
37 |
| - |
38 |
| ---- |
39 |
| - |
40 | 40 | ### How to use
|
41 | 41 |
|
42 | 42 | #### Install
|
@@ -68,14 +68,13 @@ yarn @codemirror/theme-one-dark
|
68 | 68 | ```vue
|
69 | 69 | <template>
|
70 | 70 | <codemirror
|
71 |
| - class="codemirror" |
| 71 | + v-model="code" |
| 72 | + placeholder="Code gose here..." |
| 73 | + :style="{ height: '400px' }" |
72 | 74 | :autofocus="true"
|
73 |
| - placeholder="input..." |
74 | 75 | :indent-with-tab="true"
|
75 | 76 | :tabSize="2"
|
76 |
| - :style="{ height: '400px' }" |
77 | 77 | :extensions="extensions"
|
78 |
| - v-model="code" |
79 | 78 | @ready="log('ready', $event)"
|
80 | 79 | @change="log('change', $event)"
|
81 | 80 | @focus="log('focus', $event)"
|
@@ -121,7 +120,7 @@ app.use(VueCodemirror, {
|
121 | 120 | disabled: false,
|
122 | 121 | indentWithTab: true,
|
123 | 122 | tabSize: 2,
|
124 |
| - placeholder: 'input...', |
| 123 | + placeholder: 'Code gose here...', |
125 | 124 | extensions: [basicSetup]
|
126 | 125 | // ...
|
127 | 126 | })
|
|
0 commit comments