组件示例

HTML Editor

<HTMLEditor
  defaultValue="Hello, HTML!"
  onChange={function noRefCheck() {}}
/>

Block Editor

<BlockEditor
  defaultValue={{
    blocks: [
      {
        data: {
          level: 2,
          text: '编辑演示'
        },
        id: '-dav4FSc-x',
        type: 'header'
      },
      {
        data: {
          text: 'something awesome...'
        },
        id: '-rN-eVAbuC',
        type: 'paragraph'
      }
    ],
    time: 1640560412325,
    version: '2.22.2'
  }}
  name="content"
/>

Block Editor to HTML

编辑演示

something awesome...

<EditorHTML
  data={{
    blocks: [
      {
        data: {
          level: 2,
          text: '编辑演示'
        },
        id: '-dav4FSc-x',
        type: 'header'
      },
      {
        data: {
          text: 'something awesome...'
        },
        id: '-rN-eVAbuC',
        type: 'paragraph'
      }
    ],
    time: 1640560412325,
    version: '2.22.2'
  }}
 />