View as Markdown

API reference: @salmonui/rich-text/collab

CollaborationOptionsinterface

import type { CollaborationOptions } from '@salmonui/rich-text/collab';
interface CollaborationOptions {
    readonly doc: Y.Doc;
    readonly fragment?: string;
    readonly awareness?: Awareness;
    readonly user: CollaborationUser;
}
CollaborationOptions members (4)
NameSignatureDescription
docreadonly doc: Y.Doc;

The shared document. Seed it once (see seedCollaborationDoc); the editor then renders its content.

fragmentoptionalreadonly fragment?: string;

Name of the Y.XmlFragment holding the content (default 'prosemirror').

awarenessoptionalreadonly awareness?: Awareness;

Presence: remote cursors and selections with the user's name and color.

userreadonly user: CollaborationUser;