SelectionResult
Unified selection result returned by getSelection(). Provides a consistent interface regardless of selection mode.
Example
Section titled “Example”const selection = plugin.getSelection();if (selection.ranges.length > 0) { const firstRange = selection.ranges[0]; console.log(`Selected from (${firstRange.from.row}, ${firstRange.from.col}) to (${firstRange.to.row}, ${firstRange.to.col})`);}Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
mode | SelectionMode | The current selection mode |
ranges | CellRange[] | All selected ranges. Empty if nothing is selected. |
anchor | object | unknown | The anchor cell for range extension (Shift+click/arrow). Null if no anchor is set. |
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt