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

111-draft-js-image-plugin

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

111-draft-js-image-plugin - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

lib/modifiers/addBlankLine.js

26

lib/index.js

@@ -16,2 +16,10 @@ 'use strict';

var _addBlankLine = require('./modifiers/addBlankLine');
var _addBlankLine2 = _interopRequireDefault(_addBlankLine);
var _setSelection = require('./modifiers/setSelection');
var _setSelection2 = _interopRequireDefault(_setSelection);
var _Image = require('./Image');

@@ -60,2 +68,20 @@

},
handleReturn: function handleReturn(evt, editorState, _ref2) {
var getEditorState = _ref2.getEditorState,
setEditorState = _ref2.setEditorState;
var contentState = getEditorState().getCurrentContent();
var selectionState = getEditorState().getSelection();
var anchorKey = selectionState.getAnchorKey();
var block = contentState.getBlockForKey(anchorKey);
if (block.getType() === 'atomic') {
(0, _addBlankLine2.default)(getEditorState, setEditorState);
(0, _setSelection2.default)(getEditorState, setEditorState, 'down', evt);
return 'handled';
}
return 'not-handled';
},
addImage: _addImage2.default

@@ -62,0 +88,0 @@ };

2

package.json
{
"name": "111-draft-js-image-plugin",
"version": "2.0.1",
"version": "2.0.2",
"description": "Image Plugin for DraftJS",

@@ -5,0 +5,0 @@ "author": {

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