Module: lexical-selection/src
Functions
$addNodeStyle
▸ $addNodeStyle(node
): void
Parameters
Name | Type |
---|---|
node | TextNode |
Returns
void
Defined in
lexical-selection/src/index.ts:333
$cloneContents
▸ $cloneContents(selection
): Object
Parameters
Name | Type |
---|---|
selection | RangeSelection | NodeSelection | GridSelection |
Returns
Object
Name | Type |
---|---|
nodeMap | [NodeKey , LexicalNode ][] |
range | NodeKey [] |
Defined in
lexical-selection/src/index.ts:147
$cloneWithProperties
▸ $cloneWithProperties<T
>(node
): T
Type parameters
Name | Type |
---|---|
T | extends LexicalNode <T > |
Parameters
Name | Type |
---|---|
node | T |
Returns
T
Defined in
lexical-selection/src/index.ts:39
$getSelectionStyleValueForProperty
▸ $getSelectionStyleValueForProperty(selection
, styleProperty
, defaultValue?
): string
Parameters
Name | Type | Default value |
---|---|---|
selection | RangeSelection | undefined |
styleProperty | string | undefined |
defaultValue | string | '' |
Returns
string
Defined in
lexical-selection/src/index.ts:452
$isAtNodeEnd
▸ $isAtNodeEnd(point
): boolean
Parameters
Name | Type |
---|---|
point | Point |
Returns
boolean
Defined in
lexical-selection/src/index.ts:763
$isParentElementRTL
▸ $isParentElementRTL(selection
): boolean
Parameters
Name | Type |
---|---|
selection | RangeSelection |
Returns
boolean
Defined in
lexical-selection/src/index.ts:520
$moveCaretSelection
▸ $moveCaretSelection(selection
, isHoldingShift
, isBackward
, granularity
): void
Parameters
Name | Type |
---|---|
selection | RangeSelection |
isHoldingShift | boolean |
isBackward | boolean |
granularity | "character" | "word" | "lineboundary" |
Returns
void
Defined in
lexical-selection/src/index.ts:511
$moveCharacter
▸ $moveCharacter(selection
, isHoldingShift
, isBackward
): void
Parameters
Name | Type |
---|---|
selection | RangeSelection |
isHoldingShift | boolean |
isBackward | boolean |
Returns
void
Defined in
lexical-selection/src/index.ts:529
$patchStyleText
▸ $patchStyleText(selection
, patch
): void
Parameters
Name | Type |
---|---|
selection | RangeSelection | GridSelection |
patch | Record <string , string > |
Returns
void
Defined in
lexical-selection/src/index.ts:347
$selectAll
▸ $selectAll(selection
): void
Parameters
Name | Type |
---|---|
selection | RangeSelection |
Returns
void
Defined in
lexical-selection/src/index.ts:543
$shouldOverrideDefaultCharacterSelection
▸ $shouldOverrideDefaultCharacterSelection(selection
, isBackward
): boolean
Parameters
Name | Type |
---|---|
selection | RangeSelection |
isBackward | boolean |
Returns
boolean
Defined in
lexical-selection/src/index.ts:771
$sliceSelectedTextNodeContent
▸ $sliceSelectedTextNodeContent(selection
, textNode
): LexicalNode
Parameters
Name | Type |
---|---|
selection | RangeSelection | NodeSelection | GridSelection |
textNode | TextNode |
Returns
Defined in
lexical-selection/src/index.ts:1032
$wrapLeafNodesInElements
▸ $wrapLeafNodesInElements(selection
, createElement
, wrappingElement?
): void
Parameters
Name | Type |
---|---|
selection | RangeSelection |
createElement | () => ElementNode |
wrappingElement? | ElementNode |
Returns
void
Defined in
lexical-selection/src/index.ts:589
createDOMRange
▸ createDOMRange(editor
, anchorNode
, _anchorOffset
, focusNode
, _focusOffset
): Range
| null
Parameters
Name | Type |
---|---|
editor | LexicalEditor |
anchorNode | LexicalNode |
_anchorOffset | number |
focusNode | LexicalNode |
_focusOffset | number |
Returns
Range
| null
Defined in
lexical-selection/src/index.ts:804
createRectsFromDOMRange
▸ createRectsFromDOMRange(editor
, range
): ClientRect
[]
Parameters
Name | Type |
---|---|
editor | LexicalEditor |
range | Range |
Returns
ClientRect
[]
Defined in
lexical-selection/src/index.ts:875
getStyleObjectFromCSS
▸ getStyleObjectFromCSS(css
): Record
<string
, string
> | null
Parameters
Name | Type |
---|---|
css | string |
Returns
Record
<string
, string
> | null
Defined in
lexical-selection/src/index.ts:301
trimTextContentFromAnchor
▸ trimTextContentFromAnchor(editor
, anchor
, delCount
): void
Parameters
Name | Type |
---|---|
editor | LexicalEditor |
anchor | Point |
delCount | number |
Returns
void
Defined in
lexical-selection/src/index.ts:920