1.0.1 • Published 2 years ago

wangeditor-plugin-edit-html v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

wangEditor 编辑 HTML

English Documentation

介绍

wangEditor 编辑 HTML 插件。

npm.io

安装

yarn add wangeditor-plugin-edit-html

使用

注册到编辑器

import { Boot, IEditorConfig, IToolbarConfig } from '@wangeditor/editor'
import editHtmlModule from 'wangeditor-plugin-edit-html'

// 注册。要在创建编辑器之前注册,且只能注册一次,不可重复注册。
Boot.registerModule(editHtmlModule)

配置

// 工具栏配置
const toolbarConfig: Partial<IToolbarConfig> = {
  insertKeys: {
    index: 0,
    keys: [
      'editHtml', // “编辑 HTML”菜单
    ],
  },

  // 其他...
}

然后创建编辑器和工具栏,会用到 editorConfigtoolbarConfig 。具体查看 wangEditor 文档。

其他

支持 i18n 多语言

1.0.1

2 years ago

1.0.0

2 years ago