-
Notifications
You must be signed in to change notification settings - Fork 299
Rich Text Editor 富文本编辑器组件的 API 和 Demo 设计
Kagol edited this page Aug 27, 2023
·
5 revisions
- props
- events
- methods
- slots
props
名称 | 类型 | 默认值 | 描述 |
---|---|---|---|
v-model | string | '' | 富文本编辑器内容,是一段 HTML 字符串 |
toolbar-config | IRichToolbarConfig | ? | 配置工具栏 |
interface IRichToolbarConfig {
menus: string[][]
xxx: yyy
}
events
名称 | 类型 | 默认值 | 描述 |
---|---|---|---|
change | Function | '' | 富文本编辑器内容变化 |
methods
slots
最基本用法:
const editorValue = ref('<div><b>OpenTiny</b>是一个<sp</div>')
<tiny-rich-text-editor v-model="editorValue"></tiny-rich-text-editor>
占位符
<tiny-rich-text-editor v-model="editorValue" placeholder="请输入描述内容"></tiny-rich-text-editor>