频道栏目
首页 > 资讯 > HTML/CSS > 正文

Vue2封装的Quill富文本编辑器组件Vue-Quill-Editor代码实例

17-11-20        来源:[db:作者]  
收藏   我要投稿

1、安装

npm install vue-quill-editor --save

2、使用

<!-- -->  
<quill-editor ref="myTextEditor"  
                                :content="content"//内容对应的字段  
                                :options = "editorOption"  
                                @change="onEditorChange($event)">//内容改变事件  
                            </quill-editor>  
export default {  
    components: {  
        quillEditor  
   },data(){  
     content:""  
},methods: {  
<span style="white-space:pre">  </span>    onEditorChange({ editor, html, text }) {//富文本编辑器  文本改变时 设置字段值  
<span style="white-space:pre">  </span>        this.content = html  
<span style="white-space:pre">  </span>    }  
<span style="white-space:pre">  </span>}}  

相关TAG标签
上一篇:go语言:godoc
下一篇:BFC使用详解
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站