Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

draft-js-cleanup-empty-plugin

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

draft-js-cleanup-empty-plugin - npm Package Compare versions

Comparing version 1.0.2 to 2.0.0-beta.2

6

lib/index.js

@@ -18,4 +18,6 @@ 'use strict';

var types = [];
var cleanupEmptyPlugin = function cleanupEmptyPlugin(options) {
types = options.types || [];
var cleanupEmptyPlugin = function cleanupEmptyPlugin() {
var config = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
types = config.types || [];
return {

@@ -22,0 +24,0 @@ handleKeyCommand: function handleKeyCommand(command, _ref) {

{
"name": "draft-js-cleanup-empty-plugin",
"version": "1.0.2",
"version": "2.0.0-beta.2",
"description": "Cleanup empty Plugin for DraftJS",

@@ -24,8 +24,2 @@ "author": {

],
"peerDependencies": {
"draft-js": ">=0.5.0",
"immutable": ">=3.7.6",
"react": ">=0.14.0 || 15.0.0-rc",
"react-dom": ">=0.14.0 || 15.0.0-rc"
},
"scripts": {

@@ -41,4 +35,8 @@ "clean": "../node_modules/.bin/rimraf lib",

"find-with-regex": "^1.0.2",
"union-class-names": "^1.0.0"
"union-class-names": "^1.0.0",
"draft-js": ">=0.7.0",
"immutable": ">=3.8.1",
"react": ">=15.1.0",
"react-dom": ">=15.1.0"
}
}

@@ -1,1 +0,17 @@

# State Plugin
# DraftJS Cleanup Plugin
*This is a plugin for the `draft-js-plugins-editor`.*
Usage:
```js
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`;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc