draftmirror
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -6,3 +6,3 @@ var Immutable = require('immutable'); | ||
var Keymap = Immutable.Record({ | ||
map: {}, | ||
map: {}, // PMKeymap | ||
priority: 0 | ||
@@ -28,2 +28,17 @@ }, 'Keymap'); | ||
/** | ||
* Remove a binding | ||
* @param {String} binding | ||
* @return {Keymap} | ||
*/ | ||
Keymap.prototype.removeKey = function(key) { | ||
// TODO Use keymap.update instead, once it is fixed | ||
// https://github.com/marijnh/browserkeymap/issues/3 | ||
key = PMKeymap.normalizeKeyName(key); | ||
var bindings = this.getMap().bindings; | ||
bindings[key] = undefined; | ||
var newMap = new PMKeymap(bindings); | ||
return this.set('map', newMap); | ||
}; | ||
/** | ||
* Create a keymap | ||
@@ -30,0 +45,0 @@ * @param {Object} map |
{ | ||
"name": "draftmirror", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "React component for ProseMirror providing a Draft.js like API", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
83420
2151
1