Class: OffsetView
lexical-offset/src.OffsetView
Constructors
constructor
• new OffsetView(offsetMap
, firstNode
, blockOffsetSize?
)
Parameters
Name | Type | Default value |
---|---|---|
offsetMap | OffsetMap | undefined |
firstNode | null | OffsetNode | undefined |
blockOffsetSize | number | 1 |
Defined in
lexical-offset/src/index.ts:64
Properties
_blockOffsetSize
• _blockOffsetSize: number
Defined in
lexical-offset/src/index.ts:62
_firstNode
• _firstNode: null
| OffsetNode
Defined in
lexical-offset/src/index.ts:61
_offsetMap
• _offsetMap: OffsetMap
Defined in
lexical-offset/src/index.ts:60
Methods
createSelectionFromOffsets
▸ createSelectionFromOffsets(originalStart
, originalEnd
, diffOffsetView?
): null
| RangeSelection
Parameters
Name | Type |
---|---|
originalStart | number |
originalEnd | number |
diffOffsetView? | OffsetView |
Returns
null
| RangeSelection
Defined in
lexical-offset/src/index.ts:74
getOffsetsFromSelection
▸ getOffsetsFromSelection(selection
): [number
, number
]
Parameters
Name | Type |
---|---|
selection | RangeSelection |
Returns
[number
, number
]
Defined in
lexical-offset/src/index.ts:188