@tiptap/core 2.5.3 → 2.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -575,7 +575,7 @@
575
575
  }))
576
576
  || node.textContent
577
577
  || '%leaf%';
578
- textBefore += chunk.slice(0, Math.max(0, sliceEndPos - pos));
578
+ textBefore += node.isAtom ? chunk : chunk.slice(0, Math.max(0, sliceEndPos - pos));
579
579
  });
580
580
  return textBefore;
581
581
  };
@@ -4204,6 +4204,11 @@ img.ProseMirror-separator {
4204
4204
  }
4205
4205
  const state = this.state.apply(transaction);
4206
4206
  const selectionHasChanged = !this.state.selection.eq(state.selection);
4207
+ this.emit('beforeTransaction', {
4208
+ editor: this,
4209
+ transaction,
4210
+ nextState: state,
4211
+ });
4207
4212
  this.view.updateState(state);
4208
4213
  this.emit('transaction', {
4209
4214
  editor: this,