@eigenpal/docx-editor-core/prosemirror/cellDragSelection

Functions (3)

applyCellSelectionfunctionSource ↗

Dispatch a CellSelection spanning the two cell positions.

declare function applyCellSelection(view: EditorView, anchorCellPos: number, headCellPos: number): boolean;

createCellDragTrackerfunctionSource ↗

declare function createCellDragTracker(): CellDragTracker;

findCellPosFromPmPosfunctionSource ↗

Walk up from a PM position to the enclosing tableCell/tableHeader and return its before(d) position (what CellSelection resolves against), or null when the position isn't inside a table cell.

declare function findCellPosFromPmPos(view: EditorView, pmPos: number): number | null;

Interfaces (1)

CellDragTrackerinterfaceSource ↗

Per-gesture state machine for cell-drag selection. Create one per pointer handler; drive it from mousedown/mousemove/mouseup.

interface CellDragTracker
MemberTypeSummary
beginmousedown: record the cell under the press (or null when outside a table).
endmouseup / gesture end: clear the transient drag flags.
isCellDraggingbooleanTrue while a cell drag is actively producing CellSelections.
updatemousemove: returns true when it applied a `CellSelection` and the caller should NOT also run its text-drag selection for this move.

Variables (1)

CELL_SELECT_OVERFLOW_PXconstSource ↗

Deprecated. No longer used. The tracker ignores pointer overflow so same-cell drags stay text selections. Kept only for backward-compatible imports; will be removed in a future major.

CELL_SELECT_OVERFLOW_PX = 5

On this page