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:

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

Returns: EditorPosition — The editor position at the given coordinates.