UNPKG

@textbus/collaborate

Version:

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

17 lines (16 loc) 618 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; beforeSync?(yDoc: YDoc): Promise<void> | void; } export declare class CollaborateModule implements Module { config: CollaborateConfig; private subscription; providers: Provider[]; constructor(config: CollaborateConfig); setup(textbus: Textbus): Promise<(() => void) | void> | (() => void) | void; onDestroy(textbus: Textbus): void; }