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

Parameters:

ParameterTypeDescription
posEditorPositionThe editor position to get coordinates for.
mode?"div" | "local" | "page" | "window" | undefinedThe coordinate system to use.

Returns: CodeMirrorEditorCharCoordsThe pixel coordinates of the position.