vue2-editor 使用和说明


安装  cnpm install   vue2-editor  --save

组件内使用  import {VueEditor} from 'vue2-editor'

<vue-editor ref="editor" v-model="contractDetail" />

说明 v-model 绑定的值

两个常用用法:

一、获取光标位置
this.$refs.editor.quill.selection.savedRange.index

二、在光标位置处插入字符串或者其它数据类型

this.$refs.editor.quill.insertText(this.$refs.editor.quill.selection.savedRange.index, ‘插入的内容’)



免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM