@qht/editor
v0.0.1-beta.47
Published
富文本编辑器
Readme
安装
npm install @hb/hb-editor -s开始
<template>
<div id="hdf-editor"></div>
</template>
<script>
import HdfEditor from '@hb/hb-editor'
let editor
export default {
mounted() {
editor = new HdfEditor('#hdf-editor')
}
}
</script>
配置 同quill
我们自己的配置
userId: number // 用户id
userType: string // 用户类型,默认值是 "user", 也可以是药企用户之类的
hostType: string // 业务类型, 默认值是 "doctor"(医生圈),也可以是 "health"(健康号)
env: string // 编辑器宿主环境,默认值是 "web", 也可以是"app"事件
// 监听编辑器内部的抛错
editor.on('error', function(err) {
// 处理错误逻辑
})