scribe-editor
Advanced tools
Comparing version 0.1.23 to 0.1.24
{ | ||
"name": "scribe-editor", | ||
"version": "0.1.23", | ||
"version": "0.1.24", | ||
"main": "src/scribe.js", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -111,4 +111,4 @@ Scribe [](https://travis-ci.org/guardian/scribe) | ||
of the non-standardised list of commands that appears in | ||
[this MDN article][Executing Commands]. It has been tested in Firefox >= 21, | ||
Chrome >= 27, and Safari 7. | ||
[this MDN article][Executing Commands]. It has been tested in Firefox >= 31, | ||
Chrome >= 35. | ||
@@ -118,2 +118,3 @@ See the [status of our integration tests](https://travis-ci.org/guardian/scribe) | ||
### Commands | ||
@@ -146,11 +147,14 @@ | ||
all of which can be seen in use in our [example][example]. | ||
* [scribe-plugin-keyboard-shortcuts](https://github.com/guardian/scribe-plugin-keyboard-shortcuts) | ||
* [scribe-plugin-blockquote-command](https://github.com/guardian/scribe-plugin-blockquote-command) | ||
* [scribe-plugin-code-command](https://github.com/guardian/scribe-plugin-code-command) | ||
* [scribe-plugin-curly-quotes](https://github.com/guardian/scribe-plugin-curly-quotes) | ||
* [scribe-plugin-formatter-html-ensure-semantic-elements](https://github.com/guardian/scribe-plugin-formatter-html-ensure-semantic-elements) | ||
* [scribe-plugin-formatter-plain-text-convert-new-lines-to-html](https://github.com/guardian/scribe-plugin-formatter-plain-text-convert-new-lines-to-html) | ||
* [scribe-plugin-curly-quotes](https://github.com/guardian/scribe-plugin-curly-quotes) | ||
* [scribe-plugin-heading-command](https://github.com/guardian/scribe-plugin-heading-command) | ||
* [scribe-plugin-inline-styles-to-elements](https://github.com/guardian/scribe-plugin-inline-styles-to-elements) | ||
* [scribe-plugin-intelligent-unlink-command](https://github.com/guardian/scribe-plugin-intelligent-unlink-command) | ||
* [scribe-plugin-inline-styles-to-elements](https://github.com/guardian/scribe-plugin-inline-styles-to-elements) | ||
* [scribe-plugin-keyboard-shortcuts](https://github.com/guardian/scribe-plugin-keyboard-shortcuts) | ||
* [scribe-plugin-link-prompt-command](https://github.com/guardian/scribe-plugin-link-prompt-command) | ||
* [scribe-plugin-noting](https://github.com/guardian/scribe-plugin-noting) | ||
* [scribe-plugin-sanitizer](https://github.com/guardian/scribe-plugin-sanitizer) | ||
@@ -157,0 +161,0 @@ * [scribe-plugin-smart-lists](https://github.com/guardian/scribe-plugin-smart-lists) |
@@ -18,2 +18,5 @@ define([ | ||
Selection.prototype.getContaining = function (nodeFilter) { | ||
var range = this.range; | ||
if (!range) { return; } | ||
var node = new scribe.api.Node(this.range.commonAncestorContainer); | ||
@@ -27,2 +30,5 @@ var isTopContainerElement = node.node && node.node.attributes | ||
Selection.prototype.placeMarkers = function () { | ||
var range = this.range; | ||
if(!range) { return; } | ||
var startMarker = document.createElement('em'); | ||
@@ -29,0 +35,0 @@ startMarker.classList.add('scribe-marker'); |
@@ -94,18 +94,29 @@ define([ | ||
// Patches | ||
this.use(patches.commands.bold()); | ||
this.use(patches.commands.indent()); | ||
this.use(patches.commands.insertHTML()); | ||
this.use(patches.commands.insertList()); | ||
this.use(patches.commands.outdent()); | ||
this.use(patches.commands.createLink()); | ||
this.use(patches.events()); | ||
this.use(commands.indent()); | ||
this.use(commands.insertList()); | ||
this.use(commands.outdent()); | ||
this.use(commands.redo()); | ||
this.use(commands.subscript()); | ||
this.use(commands.superscript()); | ||
this.use(commands.undo()); | ||
var mandatoryPatches = [ | ||
patches.commands.bold, | ||
patches.commands.indent, | ||
patches.commands.insertHTML, | ||
patches.commands.insertList, | ||
patches.commands.outdent, | ||
patches.commands.createLink, | ||
patches.events | ||
]; | ||
var mandatoryCommands = [ | ||
commands.indent, | ||
commands.insertList, | ||
commands.outdent, | ||
commands.redo, | ||
commands.subscript, | ||
commands.superscript, | ||
commands.undo, | ||
]; | ||
var allPlugins = [].concat(mandatoryPatches, mandatoryCommands); | ||
allPlugins.forEach(function(plugin) { | ||
this.use(plugin()); | ||
}.bind(this)); | ||
this.use(events()); | ||
@@ -112,0 +123,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
3791
188
0
182472
68