feat: add isChangeOrigin helper method
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
"@tiptap/core": "^2.0.0-beta.1"
|
"@tiptap/core": "^2.0.0-beta.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"prosemirror-state": "^1.3.4",
|
||||||
"y-prosemirror": "^1.0.9"
|
"y-prosemirror": "^1.0.9"
|
||||||
},
|
},
|
||||||
"repository": {
|
"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'
|
import { Collaboration } from './collaboration'
|
||||||
|
|
||||||
export * from './collaboration'
|
export * from './collaboration'
|
||||||
|
export * from './helpers/isChangeOrigin'
|
||||||
|
|
||||||
export default Collaboration
|
export default Collaboration
|
||||||
|
|||||||
Reference in New Issue
Block a user