Skip to main content

Module: lexical-text/src

Type Aliases

EntityMatch

Ƭ EntityMatch: Object

Type declaration

NameType
endnumber
startnumber

Defined in

lexical-text/src/index.ts:271


TextNodeWithOffset

Ƭ TextNodeWithOffset: Object

Type declaration

NameType
nodeTextNode
offsetnumber

Defined in

lexical-text/src/index.ts:33

Functions

$canShowPlaceholder

$canShowPlaceholder(isComposing, isReadOnly?): boolean

Parameters

NameTypeDefault value
isComposingbooleanundefined
isReadOnlybooleanfalse

Returns

boolean

Defined in

lexical-text/src/index.ts:218


$canShowPlaceholderCurry

$canShowPlaceholderCurry(isEditorComposing, isReadOnly?): () => boolean

Parameters

NameTypeDefault value
isEditorComposingbooleanundefined
isReadOnlybooleanfalse

Returns

fn

▸ (): boolean

Returns

boolean

Defined in

lexical-text/src/index.ts:263


$findNodeWithOffsetFromJoinedText

$findNodeWithOffsetFromJoinedText(offsetInJoinedText, joinedTextLength, separatorLength, elementNode): TextNodeWithOffset | null

Parameters

NameType
offsetInJoinedTextnumber
joinedTextLengthnumber
separatorLengthnumber
elementNodeElementNode

Returns

TextNodeWithOffset | null

Defined in

lexical-text/src/index.ts:137


$findTextIntersectionFromCharacters

$findTextIntersectionFromCharacters(root, targetCharacters): null | { node: TextNode ; offset: number }

Parameters

NameType
rootRootNode
targetCharactersnumber

Returns

null | { node: TextNode ; offset: number }

Defined in

lexical-text/src/index.ts:38


$isRootTextContentEmpty

$isRootTextContentEmpty(isEditorComposing, trim?): boolean

Parameters

NameTypeDefault value
isEditorComposingbooleanundefined
trimbooleantrue

Returns

boolean

Defined in

lexical-text/src/index.ts:188


$isRootTextContentEmptyCurry

$isRootTextContentEmptyCurry(isEditorComposing, trim?): () => boolean

Parameters

NameType
isEditorComposingboolean
trim?boolean

Returns

fn

▸ (): boolean

Returns

boolean

Defined in

lexical-text/src/index.ts:205


$joinTextNodesInElementNode

$joinTextNodesInElementNode(elementNode, separator, stopAt): string

Parameters

NameType
elementNodeElementNode
separatorstring
stopAtTextNodeWithOffset

Returns

string

Defined in

lexical-text/src/index.ts:87


$rootTextContent

$rootTextContent(): string

Returns

string

Defined in

lexical-text/src/index.ts:212


registerLexicalTextEntity

registerLexicalTextEntity<T>(editor, getMatch, targetNode, createNode): () => void[]

Type parameters

NameType
Textends TextNode<T>

Parameters

NameType
editorLexicalEditor
getMatch(text: string) => null | EntityMatch
targetNodeKlass<T>
createNode(textNode: TextNode) => T

Returns

() => void[]

Defined in

lexical-text/src/index.ts:273