UNPKG

@textbus/collaborate

Version:

Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.

18 lines (17 loc) 610 B
import { Module, Textbus } from '@textbus/core'; import { Provider } from '@viewfly/core'; import { Doc as YDoc } from 'yjs'; import { SyncConnector } from './base/_api'; export interface CollaborateConfig { createConnector(yDoc: YDoc): SyncConnector; onlyLoad?: boolean; } export declare class CollaborateModule implements Module { config: CollaborateConfig; private subscription; providers: Provider[]; private timer; constructor(config: CollaborateConfig); setup(textbus: Textbus): Promise<(() => void) | void> | (() => void) | void; onDestroy(textbus: Textbus): void; }