Mark the table cells the selection covers, so the user can see what a cell
command is about to act on. A table of empty cells is otherwise ambiguous,
and a multi-cell selection is invisible without this.
The marked set is exactly what cellsInSelection reports, which is what
setCellBackground and the merge commands operate on: the highlight and the
commands cannot disagree about which cells are selected.
This is a DOM affordance, not document state: the classes are applied
directly rather than through a transaction, so they never enter the document
or the history. Returns a disposer.
Mark the table cells the selection covers, so the user can see what a cell command is about to act on. A table of empty cells is otherwise ambiguous, and a multi-cell selection is invisible without this.
The marked set is exactly what
cellsInSelectionreports, which is whatsetCellBackgroundand the merge commands operate on: the highlight and the commands cannot disagree about which cells are selected.This is a DOM affordance, not document state: the classes are applied directly rather than through a transaction, so they never enter the document or the history. Returns a disposer.