Skip to content
GitHubDiscord

prosekit/extensions/yjs

Options for y-prosemirror's yCursorPlugin.

awareness: Awareness


Options for y-prosemirror's ySyncPlugin.

fragment: YXmlFragment


Options for the y-prosemirror's yUndoPlugin.


doc: Doc

The Yjs instance handles the state of shared data.

awareness: Awareness

The Awareness instance.

fragment?: YXmlFragment

The Yjs XmlFragment to use. If not provided, doc.getXmlFragment('prosemirror') will be used.

sync?: YSyncOpts

Options for y-prosemirror's ySyncPlugin.

undo?: object

Options for the y-prosemirror's yUndoPlugin.

cursor?: object

Options for y-prosemirror's yCursorPlugin.

type YjsCursorPluginOptions = NonNullable<Parameters<typeof yCursorPlugin>[1]>

Options for y-prosemirror's yCursorPlugin.


type YjsSyncPluginOptions = NonNullable<Parameters<typeof ySyncPlugin>[1]>

Options for y-prosemirror's ySyncPlugin.


type YjsUndoPluginOptions = NonNullable<Parameters<typeof originalYUndoPlugin>[0]>

Options for the y-prosemirror's yUndoPlugin.

function defineYjsCommands(): YjsCommandsExtension


function defineYjsCursorPlugin(options: YjsCursorOptions): PlainExtension


function defineYjsKeymap(): PlainExtension


function defineYjsSyncPlugin(options: YjsSyncOptions): PlainExtension


function defineYjs(options: YjsOptions): YjsExtension