Skip to content

prosekit/extensions/loro

LoroCursorOptions

awareness: CursorAwareness

createCursor?: (user: `${number}`) => Element

createSelection?: (user: `${number}`) => DecorationAttrs

getSelection?: (state: EditorState) => Selection

LoroOptions

awareness: CursorAwareness

The Awareness instance.

cursor?: Omit<LoroCursorOptions, "awareness">

Extra options for LoroCursorPlugin.

doc: LoroDocType

The Loro instance handles the state of shared data.

sync?: Omit<LoroSyncPluginProps, "doc">

Extra options for LoroSyncPlugin.

undo?: Omit<LoroUndoPluginProps, "doc">

Extra options for the LoroUndoPlugin.

defineLoro

ts
function defineLoro(options: LoroOptions): LoroExtension

defineLoroCommands

ts
function defineLoroCommands(): LoroCommandsExtension

defineLoroCursorPlugin

ts
function defineLoroCursorPlugin(options: LoroCursorOptions): PlainExtension

defineLoroKeymap

ts
function defineLoroKeymap(): PlainExtension

defineLoroSyncPlugin

ts
function defineLoroSyncPlugin(options: LoroSyncPluginProps): PlainExtension

defineLoroUndoPlugin

ts
function defineLoroUndoPlugin(options: LoroUndoPluginProps): PlainExtension