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'): EditorPosition

Parameters:

ParameterTypeDescription
type?'anchor' | 'end' | 'head' | 'start'Which end of the selection to return.

Returns: EditorPosition — The cursor position.