Skip to content

Commit 2f011c0

Browse files
authored
Update README.md
1 parent 28409b7 commit 2f011c0

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

README.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,16 @@
1212

1313
[CodeMirror(6)](https://codemirror.net/6/docs/) component for Vue(3).
1414

15-
[**Example site**](https://github.surmon.me/vue-codemirror)
15+
[**Example Site**](https://github.surmon.me/vue-codemirror)
1616

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
1825

1926
- [CodeMirror6 Guide](https://codemirror.net/6/docs/guide/)
2027
- [CodeMirror6 APIs](https://codemirror.net/6/docs/ref/)
@@ -23,20 +30,13 @@
2330
- [CodeMirror6 Example: Styling](https://codemirror.net/6/examples/styling/)
2431
- [CodeMirror Forum](https://discuss.codemirror.net/)
2532

26-
### CodeMirror packages
33+
#### CodeMirror packages
2734

2835
- [CodeMirror6 Languages](https://github.com/orgs/codemirror/repositories?q=lang-&type=all)
2936
- [CodeMirror6 Themes](https://github.com/orgs/codemirror/repositories?q=theme&type=all)
3037

3138
---
3239

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-
4040
### How to use
4141

4242
#### Install
@@ -68,14 +68,13 @@ yarn @codemirror/theme-one-dark
6868
```vue
6969
<template>
7070
<codemirror
71-
class="codemirror"
71+
v-model="code"
72+
placeholder="Code gose here..."
73+
:style="{ height: '400px' }"
7274
:autofocus="true"
73-
placeholder="input..."
7475
:indent-with-tab="true"
7576
:tabSize="2"
76-
:style="{ height: '400px' }"
7777
:extensions="extensions"
78-
v-model="code"
7978
@ready="log('ready', $event)"
8079
@change="log('change', $event)"
8180
@focus="log('focus', $event)"
@@ -121,7 +120,7 @@ app.use(VueCodemirror, {
121120
disabled: false,
122121
indentWithTab: true,
123122
tabSize: 2,
124-
placeholder: 'input...',
123+
placeholder: 'Code gose here...',
125124
extensions: [basicSetup]
126125
// ...
127126
})

0 commit comments

Comments
 (0)