Skip to main content

Module: @lexical/text

Type Aliases

EntityMatch

Ƭ EntityMatch: Object

Type declaration

NameType
endnumber
startnumber

Defined in

lexical-text/src/index.ts:148


TextNodeWithOffset

Ƭ TextNodeWithOffset: Object

Type declaration

NameType
nodeTextNode
offsetnumber

Defined in

lexical-text/src/index.ts:21

Functions

$canShowPlaceholder

$canShowPlaceholder(isComposing): boolean

Parameters

NameType
isComposingboolean

Returns

boolean

Defined in

lexical-text/src/index.ts:101


$canShowPlaceholderCurry

$canShowPlaceholderCurry(isEditorComposing): () => boolean

Parameters

NameType
isEditorComposingboolean

Returns

fn

▸ (): boolean

Returns

boolean

Defined in

lexical-text/src/index.ts:142


$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:26


$isRootTextContentEmpty

$isRootTextContentEmpty(isEditorComposing, trim?): boolean

Parameters

NameTypeDefault value
isEditorComposingbooleanundefined
trimbooleantrue

Returns

boolean

Defined in

lexical-text/src/index.ts:71


$isRootTextContentEmptyCurry

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

Parameters

NameType
isEditorComposingboolean
trim?boolean

Returns

fn

▸ (): boolean

Returns

boolean

Defined in

lexical-text/src/index.ts:88


$rootTextContent

$rootTextContent(): string

Returns

string

Defined in

lexical-text/src/index.ts:95


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:150