SelectionResult
Since v0.4.2
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 | SelectionMode[] | The current selection mode (or modes if array-configured) |
activeAxis | SelectionAxis | Which axis owns the active selection. v2.8.0+ |
ranges | CellRange[] | All selected ranges. Empty if nothing is selected on the row/cell/range axis. |
selectedColumns | readonly string[] | Selected column field names. Empty unless the column axis is active. v2.8.0+ |
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://toolboxjs.com/llms-full.txt