Skip to content

CodeMirrorEditor.coordsChar method

CodeMirrorEditor › coordsChar

Unofficial

Get the editor position corresponding to pixel coordinates.

Signature:

coordsChar(coords: Coords, mode: "div" | "local" | "page" | "window"): EditorPosition

Parameters:

Parameter Type Description
coords Coords The pixel coordinates to convert.
mode "div" | "local" | "page" | "window" The coordinate system of the input coordinates.

Returns: EditorPositionThe editor position at the given coordinates.