Multi Range Selection
Module Extensions
Section titled “Module Extensions”HTMLRevoGridElement (Extended from global)
Section titled “HTMLRevoGridElement (Extended from global)”interface HTMLRevoGridElement { getMultiRangeSelectedRanges?: () => MultiRangeSelectionRange[]; setMultiRangeSelectedRanges?: ( ranges: MultiRangeSelectionRange[], activeIndex?: number, ) => void; clearMultiRangeSelectedRanges?: () => void}HTMLRevoGridElementEventMap (Extended from global)
Section titled “HTMLRevoGridElementEventMap (Extended from global)”interface HTMLRevoGridElementEventMap { multirangeselectionchange: MultiRangeSelectionChangeEvent}Plugin API
Section titled “Plugin API”MultiRangeSelectionChangeEvent
Section titled “MultiRangeSelectionChangeEvent”export type MultiRangeSelectionChangeEvent = { ranges: MultiRangeSelectionRange[]; inactiveRanges: MultiRangeSelectionRange[]; activeRange: MultiRangeSelectionRange | null; activeIndex: number;};MultiRangeSelectionRange
Section titled “MultiRangeSelectionRange”export type MultiRangeSelectionRange = { rowType: DimensionRows; colType: DimensionCols; range: RangeArea;};buildMultiRangeClipboardData
Section titled “buildMultiRangeClipboardData”export function buildMultiRangeClipboardData( ranges: MultiRangeSelectionRange[], providers: PluginProviders, options: MultiRangeClipboardOptions =;MULTI_RANGE_CLIPBOARD_MIME
Section titled “MULTI_RANGE_CLIPBOARD_MIME”MULTI_RANGE_CLIPBOARD_MIME: string;MultiRangeClipboardData
Section titled “MultiRangeClipboardData”export type MultiRangeClipboardData = { text: string; html: string; mode: 'sparse' | 'blocks'; payload?: MultiRangeClipboardPayload;};MultiRangeClipboardPayload
Section titled “MultiRangeClipboardPayload”export type MultiRangeClipboardPayload = { width: number; height: number; cells: MultiRangeClipboardCell[];};MultiRangeClipboardOptions
Section titled “MultiRangeClipboardOptions”export type MultiRangeClipboardOptions = { maxSparseCells?: number; maxSparseExpansion?: number; preserveSparseGaps?: boolean; serializeValue?: (value: unknown) => string;};normalizeMultiTablePasteData
Section titled “normalizeMultiTablePasteData”export function normalizeMultiTablePasteData(;buildMultiRangeClearEdits
Section titled “buildMultiRangeClearEdits”export function buildMultiRangeClearEdits( ranges: MultiRangeSelectionRange[], providers: PluginProviders, value: DataFormat = '',): BeforeRangeSaveDataDetails[] | null;MultiRangeClipboardPlugin
Section titled “MultiRangeClipboardPlugin”Clipboard companion for {@link MultiRangeSelectionPlugin}.
Keeps multi-range copy and paste behavior separate from selection state: it serializes all selected ranges and normalizes RevoGrid multi-table HTML paste back to the complete text payload.
Dependencies
Section titled “Dependencies”- Event integration
CLIPBOARD_COPY_EVENT,CLIPBOARD_PASTE_EVENT: Listens to RevoGrid clipboard events to copy and paste multi-range selections. - Event integration
json-clipboard: Cooperates with ClipboardJsonPlugin when JSON clipboard serialization is enabled.
class MultiRangeClipboardPlugin {}MultiRangeSelectionPlugin
Section titled “MultiRangeSelectionPlugin”Enables spreadsheet-like multi-range cell selection in RevoGrid Pro.
Ctrl/Cmd+click stores the current active range and starts a new active range. Shift interactions keep extending the active core range. Additional inactive ranges are rendered by this plugin and included in multi-range copy output.
Dependencies
Section titled “Dependencies”- Auto-installed
MultiRangeClipboardPlugin: Installs MultiRangeClipboardPlugin internally for multi-range copy and paste behavior. - Event integration
MultiRangeClipboardPlugin: Delegates multi-range clipboard serialization and paste normalization to MultiRangeClipboardPlugin.
class MultiRangeSelectionPlugin { getSelectedRanges(): MultiRangeSelectionRange[];
setSelectedRanges( ranges: MultiRangeSelectionRange[], activeIndex = ranges.length - 1, );
clearSelectedRanges();
destroy();}normalizeRange
Section titled “normalizeRange”export function normalizeRange(range: RangeArea): RangeArea;cloneRange
Section titled “cloneRange”export function cloneRange(range: RangeArea): RangeArea;normalizeSelectionRange
Section titled “normalizeSelectionRange”export function normalizeSelectionRange( selection: MultiRangeSelectionRange,): MultiRangeSelectionRange;cloneSelectionRange
Section titled “cloneSelectionRange”export function cloneSelectionRange( selection: MultiRangeSelectionRange,): MultiRangeSelectionRange;rangeKey
Section titled “rangeKey”export function rangeKey(selection: MultiRangeSelectionRange);dedupeRanges
Section titled “dedupeRanges”export function dedupeRanges( ranges: MultiRangeSelectionRange[],): MultiRangeSelectionRange[];sortRanges
Section titled “sortRanges”export function sortRanges( ranges: MultiRangeSelectionRange[],): MultiRangeSelectionRange[];isCellInRange
Section titled “isCellInRange”export function isCellInRange(cell: Cell, range: RangeArea);findRangeForCell
Section titled “findRangeForCell”export function findRangeForCell( cell: MultiRangeSelectionCell, ranges: MultiRangeSelectionRange[],);rangeCellCount
Section titled “rangeCellCount”export function rangeCellCount(range: RangeArea);isSingleCellRange
Section titled “isSingleCellRange”export function isSingleCellRange(range: RangeArea);getRangeBounds
Section titled “getRangeBounds”export function getRangeBounds(ranges: MultiRangeSelectionRange[]): RangeArea | null;groupRangesByDimension
Section titled “groupRangesByDimension”export function groupRangesByDimension(ranges: MultiRangeSelectionRange[]);getInactiveRangeCellClasses
Section titled “getInactiveRangeCellClasses”export function getInactiveRangeCellClasses( cell: MultiRangeSelectionCell, selection: MultiRangeSelectionRange,);moveCellWithinRange
Section titled “moveCellWithinRange”export function moveCellWithinRange( range: RangeArea, focus: Cell, key: string, backwards = false,): Cell | null;MULTI_RANGE_SELECTION_GRID_CLASS
Section titled “MULTI_RANGE_SELECTION_GRID_CLASS”MULTI_RANGE_SELECTION_GRID_CLASS: string;MULTI_RANGE_SELECTION_CELL_CLASS
Section titled “MULTI_RANGE_SELECTION_CELL_CLASS”MULTI_RANGE_SELECTION_CELL_CLASS: string;MULTI_RANGE_SELECTION_ATTR
Section titled “MULTI_RANGE_SELECTION_ATTR”MULTI_RANGE_SELECTION_ATTR: string;MULTI_RANGE_SELECTION_EDGE_TOP_CLASS
Section titled “MULTI_RANGE_SELECTION_EDGE_TOP_CLASS”MULTI_RANGE_SELECTION_EDGE_TOP_CLASS: string;MULTI_RANGE_SELECTION_EDGE_RIGHT_CLASS
Section titled “MULTI_RANGE_SELECTION_EDGE_RIGHT_CLASS”MULTI_RANGE_SELECTION_EDGE_RIGHT_CLASS: string;MULTI_RANGE_SELECTION_EDGE_BOTTOM_CLASS
Section titled “MULTI_RANGE_SELECTION_EDGE_BOTTOM_CLASS”MULTI_RANGE_SELECTION_EDGE_BOTTOM_CLASS: string;MULTI_RANGE_SELECTION_EDGE_LEFT_CLASS
Section titled “MULTI_RANGE_SELECTION_EDGE_LEFT_CLASS”MULTI_RANGE_SELECTION_EDGE_LEFT_CLASS: string;MultiRangeClipboardCell
Section titled “MultiRangeClipboardCell”export type MultiRangeClipboardCell = { row: number; col: number; value: unknown;};MultiRangeSelectionCell
Section titled “MultiRangeSelectionCell”export type MultiRangeSelectionCell = { row: number; col: number; rowType: DimensionRows; colType: DimensionCols;};