Skip to content

Commit 534045a

Browse files
committed
chore: update readme
1 parent 50a2df0 commit 534045a

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

README.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@
99

1010
[简体中文](https://rennzhang.github.io/codemirror-editor-vue3/zh-CN/guide/getting-started)
1111

12-
The codemirror component of vue3. This component is developed based on [Codemirror 5](http://codemirror.net/5/) and only vue3 is supported.
12+
The codemirror component of vue3. This component is developed based on [Codemirror 5](http://codemirror.net/5/) and only
13+
vue3 is supported.
1314

14-
In addition to the officially supported modes, the log output presentation mode is added, out of the box, but not necessarily suitable for all scenarios.
15+
In addition to the officially supported modes, the log output presentation mode is added, out of the box, but not
16+
necessarily suitable for all scenarios.
1517

16-
For complete documentation and more cases, please check [codemirror-editor-vue3 docs](https://RennZhang.github.io/codemirror-editor-vue3/).
18+
For complete documentation and more cases, please check
19+
[codemirror-editor-vue3 docs](https://RennZhang.github.io/codemirror-editor-vue3/).
1720

1821
## Install
1922

@@ -37,7 +40,8 @@ npm install @types/codemirror -D
3740

3841
## Register global component
3942

40-
> **Do not recommend global registration components**, which will result in the type of prompt on the template that cannot be properly obtained.
43+
> **Do not recommend global registration components**, which will result in the type of prompt on the template that
44+
> cannot be properly obtained.
4145
4246
`main.js:`
4347

@@ -107,6 +111,20 @@ for (; i < 9; i++) {
107111
</script>
108112
```
109113

114+
## Language highlighting
115+
116+
> You can click on the following link to view corresponding language cases
117+
118+
- [javascript](https://rennzhang.github.io/codemirror-editor-vue3/example?lang=javascript)
119+
- [json](https://rennzhang.github.io/codemirror-editor-vue3/example?lang=json)
120+
- [css](https://rennzhang.github.io/codemirror-editor-vue3/example?lang=css)
121+
- [html](https://rennzhang.github.io/codemirror-editor-vue3/example?lang=html)
122+
- [apl](https://rennzhang.github.io/codemirror-editor-vue3/example?lang=apl)
123+
- [yaml](https://rennzhang.github.io/codemirror-editor-vue3/example?lang=yaml)
124+
125+
More cases are gradually being added, and you can also refer to
126+
[document](https://rennzhang.github.io/codemirror-editor-vue3/guide/lang) to achieve more language modes.
127+
110128
## Component Props
111129

112130
[cm_config_url]: https://codemirror.net/doc/manual.html#config
@@ -125,12 +143,12 @@ for (; i < 9; i++) {
125143
| **KeepCursorInEnd** | Always keep the mouse position on the last line | `boolean` | `false` |
126144
| **merge** | merge mode, can also be used as diff pattern | `boolean` | `false` |
127145

128-
129146
## Events
130147

131148
### Component Events
132149

133-
> The following three are only the events encapsulated by this component. Please refer to more events [Codemirror Events](./events#codemirror-events)
150+
> The following three are only the events encapsulated by this component. Please refer to more events
151+
> [Codemirror Events](./events#codemirror-events)
134152
135153
| event name | description | params |
136154
| ---------- | :---------------------------------: | :------------------------------------ |
@@ -142,7 +160,9 @@ for (; i < 9; i++) {
142160

143161
### Codemirror Events
144162

145-
The following events are official events of Codemirror5. You can refer to the official documents for details [Codemirror Event](https://codemirror.net/doc/manual.html#events),You can use this component to bind events directly through components, for example:
163+
The following events are official events of Codemirror5. You can refer to the official documents for details
164+
[Codemirror Event](https://codemirror.net/doc/manual.html#events),You can use this component to bind events directly
165+
through components, for example:
146166

147167
```vue {8-10}
148168
<Codemirror

0 commit comments

Comments
 (0)