y-prosemirror
Advanced tools
Comparing version 1.1.1 to 1.1.2
{ | ||
"name": "y-prosemirror", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Prosemirror bindings for Yjs", | ||
@@ -5,0 +5,0 @@ "main": "./dist/y-prosemirror.cjs", |
@@ -13,3 +13,3 @@ /** | ||
import * as error from 'lib0/error' | ||
import { ySyncPluginKey } from './keys.js' | ||
import { ySyncPluginKey, yUndoPluginKey } from './keys.js' | ||
import * as Y from 'yjs' | ||
@@ -161,2 +161,12 @@ import { absolutePositionToRelativePosition, relativePositionToAbsolutePosition } from '../lib.js' | ||
changedInitialContent = true | ||
if (pluginState.addToHistory === false && !pluginState.isChangeOrigin) { | ||
const yUndoPluginState = yUndoPluginKey.getState(view.state) | ||
/** | ||
* @type {Y.UndoManager} | ||
*/ | ||
const um = yUndoPluginState && yUndoPluginState.undoManager | ||
if (um) { | ||
um.stopCapturing() | ||
} | ||
} | ||
pluginState.doc.transact(tr => { | ||
@@ -399,3 +409,3 @@ tr.meta.set('addToHistory', pluginState.addToHistory) | ||
this.mux(() => { | ||
this.doc.transact(() => { | ||
this.doc.transact(tr => { | ||
updateYFragment(this.doc, this.type, doc, this.mapping) | ||
@@ -402,0 +412,0 @@ this.beforeTransactionSelection = getRelativeSelection(this, this.prosemirrorView.state) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
234153
3160