Module: lexical-text/src
Type Aliases
EntityMatch
Ƭ EntityMatch: Object
Type declaration
Name | Type |
---|---|
end | number |
start | number |
Defined in
lexical-text/src/index.ts:271
TextNodeWithOffset
Ƭ TextNodeWithOffset: Object
Type declaration
Name | Type |
---|---|
node | TextNode |
offset | number |
Defined in
lexical-text/src/index.ts:33
Functions
$canShowPlaceholder
▸ $canShowPlaceholder(isComposing
, isReadOnly?
): boolean
Parameters
Name | Type | Default value |
---|---|---|
isComposing | boolean | undefined |
isReadOnly | boolean | false |
Returns
boolean
Defined in
lexical-text/src/index.ts:218
$canShowPlaceholderCurry
▸ $canShowPlaceholderCurry(isEditorComposing
, isReadOnly?
): () => boolean
Parameters
Name | Type | Default value |
---|---|---|
isEditorComposing | boolean | undefined |
isReadOnly | boolean | false |
Returns
fn
▸ (): boolean
Returns
boolean
Defined in
lexical-text/src/index.ts:263
$findNodeWithOffsetFromJoinedText
▸ $findNodeWithOffsetFromJoinedText(offsetInJoinedText
, joinedTextLength
, separatorLength
, elementNode
): TextNodeWithOffset
| null
Parameters
Name | Type |
---|---|
offsetInJoinedText | number |
joinedTextLength | number |
separatorLength | number |
elementNode | ElementNode |
Returns
TextNodeWithOffset
| null
Defined in
lexical-text/src/index.ts:137
$findTextIntersectionFromCharacters
▸ $findTextIntersectionFromCharacters(root
, targetCharacters
): null
| { node
: TextNode
; offset
: number
}
Parameters
Name | Type |
---|---|
root | RootNode |
targetCharacters | number |
Returns
null
| { node
: TextNode
; offset
: number
}
Defined in
lexical-text/src/index.ts:38
$isRootTextContentEmpty
▸ $isRootTextContentEmpty(isEditorComposing
, trim?
): boolean
Parameters
Name | Type | Default value |
---|---|---|
isEditorComposing | boolean | undefined |
trim | boolean | true |
Returns
boolean
Defined in
lexical-text/src/index.ts:188
$isRootTextContentEmptyCurry
▸ $isRootTextContentEmptyCurry(isEditorComposing
, trim?
): () => boolean
Parameters
Name | Type |
---|---|
isEditorComposing | boolean |
trim? | boolean |
Returns
fn
▸ (): boolean
Returns
boolean
Defined in
lexical-text/src/index.ts:205
$joinTextNodesInElementNode
▸ $joinTextNodesInElementNode(elementNode
, separator
, stopAt
): string
Parameters
Name | Type |
---|---|
elementNode | ElementNode |
separator | string |
stopAt | TextNodeWithOffset |
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
Name | Type |
---|---|
T | extends TextNode <T > |
Parameters
Name | Type |
---|---|
editor | LexicalEditor |
getMatch | (text : string ) => null | EntityMatch |
targetNode | Klass <T > |
createNode | (textNode : TextNode ) => T |
Returns
() => void
[]
Defined in
lexical-text/src/index.ts:273