codemirror-editor-vue3
Advanced tools
Comparing version 2.0.0-rc to 2.0.0
{ | ||
"name": "codemirror-editor-vue3", | ||
"description": "CodeMirror component for Vue3", | ||
"version": "2.0.0-rc", | ||
"version": "2.0.0", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "files": [ |
@@ -9,9 +9,18 @@ ### Introduction | ||
``` | ||
```bash | ||
npm install codemirror-editor-vue3 -S | ||
yarn add codemirror-editor-vue3 -S | ||
``` | ||
```bash | ||
yarn add codemirror-editor-vue3 | ||
``` | ||
```bash | ||
pnpm i codemirror-editor-vue3 codemirror -S | ||
``` | ||
### Use in the global | ||
> **Do not recommend global registration components**, which will result in the type of prompt on the template that cannot be properly obtained. | ||
`main.js:` | ||
@@ -22,9 +31,15 @@ | ||
import App from "./App.vue"; | ||
import Codemirror from "codemirror-editor-vue3"; | ||
import { GlobalCmComponent } from "codemirror-editor-vue3"; | ||
const app = createApp(App); | ||
app.use(Codemirror); | ||
app.use(GlobalCmComponent); | ||
app.mount("#app"); | ||
``` | ||
custom component name: | ||
```js | ||
app.use(GlobalCmComponent, { componentName: "customName" }); | ||
``` | ||
### Use in components | ||
@@ -81,2 +96,14 @@ | ||
### use [Codemirror Static property](https://codemirror.net/doc/manual.html#api_static) | ||
```vue | ||
import { CodeMirror } from "codemirror-editor-vue3"; CodeMirror.Pos(0, 5); | ||
``` | ||
`or:` | ||
```vue | ||
import _CodeMirror from "codemirror"; _CodeMirror.Pos(0, 5); | ||
``` | ||
### Other instructions | ||
@@ -83,0 +110,0 @@ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
70254
2
115