使用 Vue.js 和 Quill 的文本编辑器
由 Quill.js 和 Vue.js 提供的易于使用但功能强大且可自定义的富文本编辑器
// Advanced Use - Hook into Quill's API for Custom Functionality import { VueEditor, Quill } from "vue2-editor";
## Nuxt.js
在 `nuxt.config.js` 的 `modules` 部分添加 `vue2-editor/nuxt`
```javascript
{
modules: ["vue2-editor/nuxt"];
}为了避免看到 Vue 关于内容不匹配的警告,您需要
将 VueEditor 组件包裹在 Nuxt 提供的 client-only 组件中
这里显示的内容:
<client-only>
<VueEditor />
</client-only>| 名称 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| customModules | 数组 | - | 声明 Quill 模块以进行注册 |
| disabled | 布尔值 | false | 设置为 true 可禁用编辑器 |
| editorOptions | 对象 | - | 提供可合并到默认配置的对象(添加格式、自定义 Quill 模块等) |
| editorToolbar | 数组 | ** 表太长,请参阅下面的工具栏示例 | 使用自定义工具栏 |
| id | 字符串 | quill-container | 设置 id(如果页面中有多个编辑器,则必需) |
暂无开放 Issues,或尚未同步最近议题。