Skip to content

Latest commit

 

History

History
executable file
·
50 lines (33 loc) · 838 Bytes

README-en.md

File metadata and controls

executable file
·
50 lines (33 loc) · 838 Bytes

wangEditor edit HTML module

中文文档

Introduction

wangEditor Edit HTML plugin.

Installation

yarn add wangeditor-plugin-edit-html

Usage

Register to editor

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

// Register
// You should register this before create editor, and register only once (not repeatedly).
Boot.registerModule(editHtmlModule)

Menu config

const toolbarConfig: Partial<IToolbarConfig> = {
  insertKeys: {
    index: 0,
    keys: [
      'editHtml', // Edit HTML menu
    ],
  },

  // others...
}

Then create editor and toolbar, you will use editorConfig and toolbarConfig

Others

Support i18n.