position
ai-research-agent / editor/rendering/position
Functions
getBoudingBrowserRange()
function getBoudingBrowserRange(editor, range): Range
Parameters
Parameter | Type |
---|---|
| |
|
Returns
Range
getBrowserRange()
function getBrowserRange(editor, range): Range
Parameters
Parameter | Type |
---|---|
| |
|
Returns
Range
getIndexFromNode()
function getIndexFromNode(editor, startNode): number
Parameters
Parameter | Type |
---|---|
| |
|
|
Returns
number
getIndexFromNodeAndOffset()
function getIndexFromNodeAndOffset(
editor,
node,
offset,
current?): number
Parameters
Parameter | Type |
---|---|
| |
|
|
|
|
|
|
Returns
number
getIndexFromPoint()
function getIndexFromPoint(
editor,
x,
y): null | number
Parameters
Parameter | Type |
---|---|
| |
|
|
|
|
Returns
null
| number
getLineElementAt()
function getLineElementAt(editor, index): undefined | HTMLLineElement
Parameters
Parameter | Type |
---|---|
| |
|
|
Returns
undefined
| HTMLLineElement
getLineInfoFromPoint()
function getLineInfoFromPoint(editor, y): LineInfo | undefined
Parameters
Parameter | Type |
---|---|
| |
|
|
Returns
LineInfo
| undefined
getNodeAndOffset()
function getNodeAndOffset(
editor,
index,
direction): NodeOffsetAndFrozen
Parameters
Parameter | Type |
---|---|
| |
|
|
|
|
Returns
NodeOffsetAndFrozen
getNodeLength()
function getNodeLength(editor, parentNode): number
Parameters
Parameter | Type |
---|---|
| |
|
|
Returns
number
getNodesForRange()
function getNodesForRange(editor, range): [Node | null, number, Node | null, number]
Parameters
Parameter | Type |
---|---|
| |
|
Returns
[Node
| null
, number
, Node
| null
, number
]
textNodeLength()
function textNodeLength(lines, node): number
Parameters
Parameter | Type |
---|---|
| |
|
|
Returns
number
Interfaces
LineInfo
Properties
belowMid
belowMid: boolean;
element
element: HTMLLineElement;
line
line: default;
rect
rect: DOMRect;