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" | undefined): EditorPosition

Parameters:

ParameterTypeDescription
coordsCoordsThe pixel coordinates to convert.
mode?"div" | "local" | "page" | "window" | undefinedThe coordinate system of the input coordinates.

Returns: EditorPositionThe editor position at the given coordinates.