CDN引入vue-quill-editor
时间: 2023-11-24 18:46:46 浏览: 90
为了在CDN中引入vue-quill-editor,需要先在HTML文件中引入Vue和Quill的CDN链接,然后再引入vue-quill-editor的CDN链接。具体步骤如下:
1. 在HTML文件中引入Vue的CDN链接:
```html
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
```
2. 在HTML文件中引入Quill的CDN链接:
```html
<link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
<script src="https://cdn.quilljs.com/1.3.6/quill.js"></script>
```
3. 在HTML文件中引入vue-quill-editor的CDN链接:
```html
<link href="https://cdn.jsdelivr.net/npm/vue-quill-editor@4.1.0/dist/vue-quill-editor.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/vue-quill-editor@4.1.0/dist/vue-quill-editor.js"></script>
```
4. 在Vue组件中使用vue-quill-editor:
```html
<template>
<div>
<quill-editor v-model="content"></quill-editor>
</div>
</template>
<script>
import { quillEditor } from 'vue-quill-editor'
export default {
components: {
quillEditor
},
data () {
return {
content: ''
}
}
}
</script>
```
阅读全文