Skip to content

prosekit/extensions/loro

LoroCursorOptions

Properties

awareness

awareness: CursorAwareness

createCursor()?

optional createCursor: (user) => Element

Parameters

user: `${number}`

Returns

Element

createSelection()?

optional createSelection: (user) => DecorationAttrs

Parameters

user: `${number}`

Returns

DecorationAttrs

getSelection()?

optional getSelection: (state) => Selection

Parameters

state: EditorState

Returns

Selection


LoroOptions

Properties

awareness

awareness: CursorAwareness

The Awareness instance.

cursor?

optional cursor: Omit<LoroCursorOptions, "awareness">

Extra options for LoroCursorPlugin.

doc

doc: LoroDocType

The Loro instance handles the state of shared data.

sync?

optional sync: Omit<LoroSyncPluginProps, "doc">

Extra options for LoroSyncPlugin.

undo?

optional undo: Omit<LoroUndoPluginProps, "doc">

Extra options for the LoroUndoPlugin.


defineLoro()

defineLoro(options): LoroExtension

Parameters

options: LoroOptions

Returns

LoroExtension


defineLoroCommands()

defineLoroCommands(): LoroCommandsExtension

Returns

LoroCommandsExtension


defineLoroCursorPlugin()

defineLoroCursorPlugin(options): PlainExtension

Parameters

options: LoroCursorOptions

Returns

PlainExtension


defineLoroKeymap()

defineLoroKeymap(): PlainExtension

Returns

PlainExtension


defineLoroSyncPlugin()

defineLoroSyncPlugin(options): PlainExtension

Parameters

options: LoroSyncPluginProps

Returns

PlainExtension


defineLoroUndoPlugin()

defineLoroUndoPlugin(options): PlainExtension

Parameters

options: LoroUndoPluginProps

Returns

PlainExtension