Files
Tom MoorandCopilot 5279a58753 feat: Dragging of table rows and columns (#11138)
* wip: Dragging of table rows and columns

* wip

* grabbing cursor

* refactor

* Update shared/editor/plugins/TableDragDropPlugin.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update shared/editor/plugins/TableDragDropPlugin.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-10 12:32:36 -05:00

24 lines
603 B
TypeScript

import { PluginKey } from "prosemirror-state";
/** State for tracking row drag operations. */
export interface RowDragState {
isDragging: boolean;
fromIndex: number;
toIndex: number;
}
/** State for tracking column drag operations. */
export interface ColumnDragState {
isDragging: boolean;
fromIndex: number;
toIndex: number;
}
/** Plugin key for accessing row drag state. */
export const rowDragPluginKey = new PluginKey<RowDragState>("row-drag");
/** Plugin key for accessing column drag state. */
export const columnDragPluginKey = new PluginKey<ColumnDragState>(
"column-drag"
);