Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 561 Bytes

README.md

File metadata and controls

29 lines (20 loc) · 561 Bytes

DraftJS Delete Image Button Plugin

This is a plugin for the draft-js-plugins-editor.

Usage:

import createDeleteImgPlugin from 'draft-js-delete-img-btn-plugin';

const deleteImgPlugin = createDeleteImgPlugin();
const { DeleteImgBtn } = deleteImgPlugin;

// Add DeleteImgBtn after editore as
<div>
  <Editor
    editorState={this.state.editorState}
    onChange={this.onChange}
    plugins={plugins}
  />
  <DeleteImgBtn />
</div>

Dependencies:

This plugin requires that the draft-js-focus-plugin;

Forked from draft-js-alignment-plugin