1、安装

npm install vue-quill-editor --save

2、使用

import { quillEditor } from 'vue-quill-editor'

  

3、组件中

<quill-editor v-model="content"
ref="myQuillEditor"
class="editer"
:options="editorOption"
@ready="onEditorReady($event)">
</quill-editor>

  

data(){
return {
content: '<h3>文本编辑</h3>',
editorOption: { }
}
},
components: {
NavHeader,
quillEditor,
},
computed: {
editor() {
return this.$refs.myQuillEditor.quill
}
},
methods: {
onEditorReady(editor) {
console.log('editor ready!', editor)
},
submit(){
console.log(this.content);
this.$message.success('提交成功!');
}
}

  这样就已经完成了,但是有的时候在页面中 这样之后,样式会全部乱掉解决办法

main.js 中

import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import VueQuillEditor from 'vue-quill-editor' Vue.use(VueQuillEditor);

  

最新文章

  1. 【腾讯优测干货分享】Android内存泄漏的简单检查与分析方法
  2. MyEclipse8.5可用注册码(到2018年)
  3. QT程序在windows下部署发布
  4. cf B Bear and Strings
  5. 3D游戏引擎一 win32编程
  6. codeforces #286 Div.2 C DP总是以意外的方式打败我
  7. 纯CSS修改checkbox复选框样式
  8. Xilinx Vivado的使用详细介绍(3):使用IP核
  9. 过滤器(Filter)与拦截器(Interceptor )区别
  10. PATH_SEPARATOR
  11. centos7下kubernetes(5。部署kubernetes dashboard)
  12. LR 两种html与url录制
  13. js运用4
  14. USB3.0及NVME SSD安装WIN7X64
  15. fortran77读写文本文档
  16. HDOJ4548_美素数
  17. Libevent源码分析—event_add()
  18. mysql索引 B+tree
  19. ios中自定义图层的2种方法
  20. SM2椭圆曲线公钥密码算法

热门文章

  1. noip模拟赛 第k大区间
  2. libcloud代码研究(二)——云服务封装
  3. P1265 公路修建 洛谷
  4. MyBatis 3模糊查询(like)写法(转)
  5. mongodb之存储引擎
  6. jsencrypt代码分析
  7. luogu3834 【模板】可持久化线段树1(主席树)
  8. codeforces 782B The Meeting Place Cannot Be Changed+hdu 4355+hdu 2438 (三分)
  9. web认证方案
  10. AAC帧格式及编码介绍