Editor.getCursor method
Editor › getCursor
Official
Get the cursor position.Signature:
getCursor($string?: 'anchor' | 'from' | 'head' | 'to'): EditorPositionParameters:
| Parameter | Type | Description |
|---|---|---|
| $string? | 'anchor' | 'from' | 'head' | 'to' | *(Optional)* |
Returns: EditorPosition — The cursor position.
Since: 0.11.11
Example:
console.log(editor.getCursor('from'));