scribe-editor
Advanced tools
Comparing version 1.2.8 to 1.2.9
@@ -1,2 +0,7 @@ | ||
# 1.3.8 | ||
# 1.2.9 | ||
Clarifies the use of nodeName in the Command implementation. Thanks [Christopher Liu](https://github.com/christopherliu) | ||
# 1.2.8 | ||
Event waterfall / [Event Namespacing](https://github.com/guardian/scribe/pull/337) | ||
@@ -3,0 +8,0 @@ |
{ | ||
"name": "scribe-editor", | ||
"version": "1.2.8", | ||
"version": "1.2.9", | ||
"main": "src/scribe.js", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -9,3 +9,3 @@ define(function () { | ||
this.nodeName = nodeName; | ||
this._nodeName = nodeName; | ||
} | ||
@@ -19,3 +19,3 @@ | ||
return scribe.api.Command.prototype.queryState.call(this) && !! selection.getContaining(function (node) { | ||
return node.nodeName === this.nodeName; | ||
return node.nodeName === this._nodeName; | ||
}.bind(this)); | ||
@@ -22,0 +22,0 @@ }; |
@@ -263,3 +263,8 @@ define([ | ||
}; | ||
/** | ||
* Applies HTML formatting to all editor text. | ||
* @param {String} phase sanitize/normalize/export are the standard phases | ||
* @param {Function} fn Function that takes the current editor HTML and returns a formatted version. | ||
*/ | ||
Scribe.prototype.registerHTMLFormatter = function (phase, fn) { | ||
@@ -266,0 +271,0 @@ this._htmlFormatterFactory.formatters[phase] |
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
183761
3848
0