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

draftail

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

draftail - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

dist/api/constants.js

7

CHANGELOG.md

@@ -7,2 +7,9 @@ Changelog

## [[v0.3.2]](https://github.com/springload/draftail/releases/tag/v0.3.2) - 2016-11-29
### Added
- Pressing return on an empty list item should un-indent it until it is not nested, and then remove it.
- Pressing return at the end of a block should create an empty unstyled block.
## [[v0.3.1]](https://github.com/springload/draftail/releases/tag/v0.3.1) - 2016-11-28

@@ -9,0 +16,0 @@

2

dist/components/BlockControls.js

@@ -15,3 +15,3 @@ 'use strict';

var _DraftUtils = require('../utils/DraftUtils');
var _DraftUtils = require('../api/DraftUtils');

@@ -18,0 +18,0 @@ var _DraftUtils2 = _interopRequireDefault(_DraftUtils);

@@ -19,3 +19,3 @@ 'use strict';

var _DraftUtils = require('../utils/DraftUtils');
var _DraftUtils = require('../api/DraftUtils');

@@ -118,2 +118,3 @@ var _DraftUtils2 = _interopRequireDefault(_DraftUtils);

_this.handleReturn = _this.handleReturn.bind(_this);
_this.handleKeyCommand = _this.handleKeyCommand.bind(_this);

@@ -242,2 +243,18 @@ _this.handleTabCommand = _this.handleTabCommand.bind(_this);

}, {
key: 'handleReturn',
value: function handleReturn(e) {
var editorState = this.state.editorState;
var ret = false;
var newState = _DraftUtils2.default.handleNewLine(editorState, e);
if (newState) {
ret = true;
this.onChange(newState);
}
return ret;
}
}, {
key: 'handleTabCommand',

@@ -633,2 +650,3 @@ value: function handleTabCommand(event) {

readOnly: readOnly,
handleReturn: this.handleReturn,
handleKeyCommand: this.handleKeyCommand,

@@ -635,0 +653,0 @@ onTab: this.handleTabCommand,

@@ -15,3 +15,3 @@ 'use strict';

var _DraftUtils = require('../utils/DraftUtils');
var _DraftUtils = require('../api/DraftUtils');

@@ -18,0 +18,0 @@ var _DraftUtils2 = _interopRequireDefault(_DraftUtils);

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});
exports.DraftUtils = undefined;
exports.INLINE_STYLE = exports.ENTITY_TYPE = exports.BLOCK_TYPE = exports.DraftUtils = undefined;

@@ -12,6 +12,8 @@ var _DraftailEditor = require('./components/DraftailEditor');

var _DraftUtils = require('./utils/DraftUtils');
var _DraftUtils = require('./api/DraftUtils');
var _DraftUtils2 = _interopRequireDefault(_DraftUtils);
var _constants = require('./api/constants');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -25,2 +27,5 @@

exports.default = _DraftailEditor2.default;
exports.DraftUtils = _DraftUtils2.default;
exports.DraftUtils = _DraftUtils2.default;
exports.BLOCK_TYPE = _constants.BLOCK_TYPE;
exports.ENTITY_TYPE = _constants.ENTITY_TYPE;
exports.INLINE_STYLE = _constants.INLINE_STYLE;

@@ -21,2 +21,20 @@ 'use strict';

});
describe('#BLOCK_TYPE', function () {
it('exists', function () {
expect(_index.BLOCK_TYPE).toBeDefined();
});
});
describe('#ENTITY_TYPE', function () {
it('exists', function () {
expect(_index.ENTITY_TYPE).toBeDefined();
});
});
describe('#INLINE_STYLE', function () {
it('exists', function () {
expect(_index.INLINE_STYLE).toBeDefined();
});
});
});
{
"name": "draftail",
"version": "0.3.1",
"version": "0.3.2",
"description": "A batteries-excluded rich text editor based on Draft.js",

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

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