Editor.wordAt method
Editor › wordAt
Official
Get the word at a specific position.Signature:
wordAt(pos: EditorPosition): EditorRange | nullParameters:
| Parameter | Type | Description |
|---|---|---|
| pos | EditorPosition | The position to get the word at. |
Returns: EditorRange | null — A range object containing the word or null if there is no word at the position.
Since: 0.11.11
Example:
console.log(editor.wordAt({ line: 12, ch: 3 }));