Trevixal API
    Preparing search index...

    Function enableCellSelection

    • Select table cells with the mouse.

      A single click puts a text cursor in the cell, as it always has: a cell is prose, and editing it is the common case. A double click selects the whole cell, and dragging from there extends the selection across cells. Clicking anywhere else drops it, because the selection moves with the click.

      The selection is an ordinary TextSelection spanning from the first cell's first textblock to the last cell's last one, not a new selection class. That is what mergeCells, splitCell and setCellBackground already read, so this gesture drives them without touching a command, and a cell selection survives undo, redo and position mapping like any other.

      Returns a disposer. Does nothing without a view.

      Parameters

      • editor: Editor

      Returns () => void