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): null | Rect

Parameters:

ParameterTypeDescription
posnumberThe document position.
side?-1 | 1Which side to get coordinates for.

Returns: null | Rect — The rectangle or null.