feat: add isChangeOrigin helper method

This commit is contained in:
Philipp Kühn
2021-10-03 20:33:33 +02:00
parent 4feb4ee36e
commit 92b6c5bdce
3 changed files with 8 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
import { ySyncPluginKey } from 'y-prosemirror'
import { Transaction } from 'prosemirror-state'
export function isChangeOrigin(transaction: Transaction): boolean {
return !!transaction.getMeta(ySyncPluginKey)
}

View File

@@ -1,5 +1,6 @@
import { Collaboration } from './collaboration'
export * from './collaboration'
export * from './helpers/isChangeOrigin'
export default Collaboration