feat: add isChangeOrigin helper method
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
"@tiptap/core": "^2.0.0-beta.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"prosemirror-state": "^1.3.4",
|
||||
"y-prosemirror": "^1.0.9"
|
||||
},
|
||||
"repository": {
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
import { ySyncPluginKey } from 'y-prosemirror'
|
||||
import { Transaction } from 'prosemirror-state'
|
||||
|
||||
export function isChangeOrigin(transaction: Transaction): boolean {
|
||||
return !!transaction.getMeta(ySyncPluginKey)
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Collaboration } from './collaboration'
|
||||
|
||||
export * from './collaboration'
|
||||
export * from './helpers/isChangeOrigin'
|
||||
|
||||
export default Collaboration
|
||||
|
||||
Reference in New Issue
Block a user