Module: @lexical/yjs
Interfaces
Type Aliases
Binding
Ƭ Binding: Object
Type declaration
Name | Type |
---|---|
clientID | number |
collabNodeMap | Map <NodeKey , CollabElementNode | CollabTextNode | CollabDecoratorNode | CollabLineBreakNode > |
cursors | Map <ClientID , Cursor > |
cursorsContainer | null | HTMLElement |
doc | Doc |
docMap | Map <string , Doc > |
editor | LexicalEditor |
excludedProperties | ExcludedProperties |
id | string |
nodeProperties | Map <string , string []> |
root | CollabElementNode |
Defined in
lexical-yjs/src/Bindings.ts:25
ClientID
Ƭ ClientID: number
Defined in
lexical-yjs/src/Bindings.ts:24
Delta
Ƭ Delta: Operation
[]
Defined in
ExcludedProperties
Ƭ ExcludedProperties: Map
<Klass
<LexicalNode
>, Set
<string
>>
Defined in
lexical-yjs/src/Bindings.ts:44
Operation
Ƭ Operation: Object
Type declaration
Name | Type |
---|---|
attributes | { __type : string } |
attributes.__type | string |
insert | string | Record <string , unknown > |
Defined in
ProviderAwareness
Ƭ ProviderAwareness: Object
Type declaration
Name | Type |
---|---|
getLocalState | () => UserState | null |
getStates | () => Map <number , UserState > |
off | (type : "update" , cb : () => void ) => void |
on | (type : "update" , cb : () => void ) => void |
setLocalState | (arg0 : UserState ) => void |
Defined in
UserState
Ƭ UserState: Object
Type declaration
Name | Type |
---|---|
anchorPos | null | RelativePosition |
awarenessData | object |
color | string |
focusPos | null | RelativePosition |
focusing | boolean |
name | string |
Defined in
YjsEvent
Ƭ YjsEvent: Record
<string
, unknown
>
Defined in
YjsNode
Ƭ YjsNode: Record
<string
, unknown
>
Defined in
Variables
CONNECTED_COMMAND
• Const
CONNECTED_COMMAND: LexicalCommand
<boolean
>
Defined in
TOGGLE_CONNECT_COMMAND
• Const
TOGGLE_CONNECT_COMMAND: LexicalCommand
<boolean
>
Defined in
Functions
createBinding
▸ createBinding(editor
, provider
, id
, doc
, docMap
, excludedProperties?
): Binding
Parameters
Name | Type |
---|---|
editor | LexicalEditor |
provider | Provider |
id | string |
doc | undefined | null | Doc |
docMap | Map <string , Doc > |
excludedProperties? | ExcludedProperties |
Returns
Defined in
lexical-yjs/src/Bindings.ts:46
createUndoManager
▸ createUndoManager(binding
, root
): UndoManager
Parameters
Name | Type |
---|---|
binding | Binding |
root | YXmlText |
Returns
UndoManager
Defined in
initLocalState
▸ initLocalState(provider
, name
, color
, focusing
, awarenessData
): void
Parameters
Name | Type |
---|---|
provider | Provider |
name | string |
color | string |
focusing | boolean |
awarenessData | object |
Returns
void
Defined in
setLocalStateFocus
▸ setLocalStateFocus(provider
, name
, color
, focusing
, awarenessData
): void
Parameters
Name | Type |
---|---|
provider | Provider |
name | string |
color | string |
focusing | boolean |
awarenessData | object |
Returns
void
Defined in
syncCursorPositions
▸ syncCursorPositions(binding
, provider
): void
Parameters
Name | Type |
---|---|
binding | Binding |
provider | Provider |
Returns
void
Defined in
lexical-yjs/src/SyncCursors.ts:399
syncLexicalUpdateToYjs
▸ syncLexicalUpdateToYjs(binding
, provider
, prevEditorState
, currEditorState
, dirtyElements
, dirtyLeaves
, normalizedNodes
, tags
): void
Parameters
Name | Type |
---|---|
binding | Binding |
provider | Provider |
prevEditorState | EditorState |
currEditorState | EditorState |
dirtyElements | Map <string , boolean > |
dirtyLeaves | Set <string > |
normalizedNodes | Set <string > |
tags | Set <string > |
Returns
void
Defined in
lexical-yjs/src/SyncEditorStates.ts:229
syncYjsChangesToLexical
▸ syncYjsChangesToLexical(binding
, provider
, events
, isFromUndoManger
): void
Parameters
Name | Type |
---|---|
binding | Binding |
provider | Provider |
events | YEvent <YText >[] |
isFromUndoManger | boolean |
Returns
void