draft-js-cleanup-empty-plugin

Cleanup empty Plugin for DraftJS

Usage no npm install needed!

<script type="module">
  import draftJsCleanupEmptyPlugin from 'https://cdn.skypack.dev/draft-js-cleanup-empty-plugin';
</script>

README

DraftJS Cleanup Plugin

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

Usage:

import createCleanupEmptyPlugin from `draft-js-cleanup-empty-plugin`;

const cleanupPlugin = createCleanupEmptyPlugin({
  types: []
});

Dependencies:

This plugin requires that the draft-js-entity-props-plugin is also applied to the Editor;