New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

scribe-editor

Package Overview
Dependencies
Maintainers
9
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scribe-editor - npm Package Compare versions

Comparing version 1.2.9 to 1.2.10

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 1.2.10
Bugfixes for selections that are 'reversed' (i.e. selected from right to left) from [Deains](https://github.com/deains). Thanks
# 1.2.9

@@ -2,0 +6,0 @@

2

package.json
{
"name": "scribe-editor",
"version": "1.2.9",
"version": "1.2.10",
"main": "src/scribe.js",

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

@@ -31,4 +31,15 @@ define([

this.range = document.createRange();
var reverseRange = document.createRange();
this.range.setStart(this.selection.anchorNode, this.selection.anchorOffset);
this.range.setEnd(this.selection.focusNode, this.selection.focusOffset);
reverseRange.setStart(this.selection.focusNode, this.selection.focusOffset);
// Check if anchorNode is before focusNode, use reverseRange if not
if (this.range.compareBoundaryPoints(Range.START_TO_START, reverseRange) <= 0) {
this.range.setEnd(this.selection.focusNode, this.selection.focusOffset);
}
else {
this.range = reverseRange;
this.range.setEnd(this.selection.anchorNode, this.selection.anchorOffset);
}
}

@@ -35,0 +46,0 @@ }

@@ -269,10 +269,10 @@ define([

*/
Scribe.prototype.registerHTMLFormatter = function (phase, fn) {
Scribe.prototype.registerHTMLFormatter = function (phase, formatter) {
this._htmlFormatterFactory.formatters[phase]
= this._htmlFormatterFactory.formatters[phase].push(fn);
= this._htmlFormatterFactory.formatters[phase].push(formatter);
};
Scribe.prototype.registerPlainTextFormatter = function (fn) {
Scribe.prototype.registerPlainTextFormatter = function (formatter) {
this._plainTextFormatterFactory.formatters
= this._plainTextFormatterFactory.formatters.push(fn);
= this._plainTextFormatterFactory.formatters.push(formatter);
};

@@ -279,0 +279,0 @@

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