prosemirror-state
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -0,1 +1,7 @@ | ||
## 1.2.3 (2019-05-08) | ||
### Bug fixes | ||
The [`insertText`](https://prosemirror.net/docs/ref/#state.Transaction.insertText) method now collapses the selection to the end of the inserted text, even when given explicit start/end positions. | ||
## 1.2.2 (2018-07-23) | ||
@@ -2,0 +8,0 @@ |
@@ -665,3 +665,5 @@ 'use strict'; | ||
} | ||
return this.replaceRangeWith(from, to, schema.text(text, marks)) | ||
this.replaceRangeWith(from, to, schema.text(text, marks)); | ||
if (!this.selection.empty) { this.setSelection(Selection.near(this.selection.$to)); } | ||
return this | ||
} | ||
@@ -803,3 +805,3 @@ }; | ||
// : (Transaction) → ?Transaction | ||
// : (Transaction) → bool | ||
EditorState.prototype.filterTransaction = function filterTransaction (tr, ignore) { | ||
@@ -994,2 +996,6 @@ var this$1 = this; | ||
// instances of a state. | ||
// | ||
// FIXME this is no longer needed as of prosemirror-view 1.9.0, | ||
// though due to backwards-compat we should probably keep it around | ||
// for a while (if only as a no-op) | ||
EditorState.addApplyListener = function addApplyListener (f) { | ||
@@ -996,0 +1002,0 @@ applyListeners.push(f); |
{ | ||
"name": "prosemirror-state", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "ProseMirror editor state", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
# prosemirror-state | ||
[ [**WEBSITE**](http://prosemirror.net) | [**ISSUES**](https://github.com/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**GITTER**](https://gitter.im/ProseMirror/prosemirror) | [**CHANGELOG**](https://github.com/ProseMirror/prosemirror/blob/master/CHANGELOG.md) ] | ||
[ [**WEBSITE**](http://prosemirror.net) | [**ISSUES**](https://github.com/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**GITTER**](https://gitter.im/ProseMirror/prosemirror) | [**CHANGELOG**](https://github.com/ProseMirror/prosemirror-state/blob/master/CHANGELOG.md) ] | ||
@@ -5,0 +5,0 @@ This is a [core module](http://prosemirror.net/docs/ref/#state) of [ProseMirror](http://prosemirror.net). |
@@ -99,3 +99,3 @@ import {Node} from "prosemirror-model" | ||
// : (Transaction) → ?Transaction | ||
// : (Transaction) → bool | ||
filterTransaction(tr, ignore = -1) { | ||
@@ -279,2 +279,6 @@ for (let i = 0; i < this.config.plugins.length; i++) if (i != ignore) { | ||
// instances of a state. | ||
// | ||
// FIXME this is no longer needed as of prosemirror-view 1.9.0, | ||
// though due to backwards-compat we should probably keep it around | ||
// for a while (if only as a no-op) | ||
static addApplyListener(f) { | ||
@@ -281,0 +285,0 @@ applyListeners.push(f) |
import {Transform} from "prosemirror-transform" | ||
import {Mark} from "prosemirror-model" | ||
import {Selection} from "./selection" | ||
@@ -163,3 +164,5 @@ const UPDATED_SEL = 1, UPDATED_MARKS = 2, UPDATED_SCROLL = 4 | ||
} | ||
return this.replaceRangeWith(from, to, schema.text(text, marks)) | ||
this.replaceRangeWith(from, to, schema.text(text, marks)) | ||
if (!this.selection.empty) this.setSelection(Selection.near(this.selection.$to)) | ||
return this | ||
} | ||
@@ -166,0 +169,0 @@ } |
Sorry, the diff of this file is not supported yet
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
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
173491
1983