mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Merge pull request #25910 from overleaf/em-track-changes-sharejs
Track changes in the history OT sharejs doc GitOrigin-RevId: 17365219f24a25790eac611dbde9681eb73d0961
This commit is contained in:
@@ -1,9 +1,23 @@
|
||||
import EventEmitter from 'events'
|
||||
import { StringFileData } from 'overleaf-editor-core'
|
||||
|
||||
// type for the Doc class in vendor/libs/sharejs.js
|
||||
export interface ShareDoc extends EventEmitter {
|
||||
export interface ShareLatexOTShareDoc extends EventEmitter {
|
||||
otType: 'sharejs-text-ot'
|
||||
snapshot: string
|
||||
detach_cm6?: () => void
|
||||
getText: () => string
|
||||
insert: (pos: number, insert: string, fromUndo: boolean) => void
|
||||
del: (pos: number, length: number, fromUndo: boolean) => void
|
||||
submitOp(op: any[]): void
|
||||
}
|
||||
|
||||
export interface HistoryOTShareDoc extends EventEmitter {
|
||||
otType: 'history-ot'
|
||||
snapshot: StringFileData
|
||||
detach_cm6?: () => void
|
||||
getText: () => string
|
||||
submitOp(op: any[]): void
|
||||
}
|
||||
|
||||
export type ShareDoc = ShareLatexOTShareDoc | HistoryOTShareDoc
|
||||
|
||||
Reference in New Issue
Block a user