Skip to content

CodeMirrorEditor.getCursor method

CodeMirrorEditor › getCursor

Unofficial

Get the cursor position, optionally specifying which end of the selection.

Signature:

getCursor(type?: "anchor" | "end" | "head" | "start" | undefined): EditorPosition

Parameters:

Parameter Type Description
type? "anchor" | "end" | "head" | "start" | undefined Which end of the selection to return.

Returns: EditorPositionThe cursor position.