Skip to content

CodeMirrorEditor.charCoords method

CodeMirrorEditor › charCoords

Unofficial

Get the pixel coordinates of a character position.

Signature:

charCoords(pos: EditorPosition, mode: "div" | "local" | "page" | "window"): Coords

Parameters:

Parameter Type Description
pos EditorPosition The editor position to get coordinates for.
mode "div" | "local" | "page" | "window" The coordinate system to use.

Returns: CoordsThe pixel coordinates of the position.