Skip to content

coldice8/wangEditor-plugin-edit-html

Repository files navigation

wangEditor 编辑 HTML

English Documentation

介绍

wangEditor 编辑 HTML 插件。

安装

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 多语言

About

wangEditor edit HTML plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published