Skip to content

EditorView.coordsAtPos method

EditorView › coordsAtPos

Official

Get the screen coordinates at the given document position.

Signature:

coordsAtPos(pos: number, side?: 1 | -1 | undefined): null | Rect

Parameters:

Parameter Type Description
pos number The document position.
side? 1 | -1 | undefined Which side to get coordinates for.

Returns: null | RectThe rectangle or null.