ProseMirror / prosemirror-tables

Table module for ProseMirror
https://prosemirror-tables.netlify.app/
MIT License
259 stars 155 forks source link

Cell selection is not a rectangle when selecting a merged cell #222

Open pekanboy opened 6 months ago

pekanboy commented 6 months ago

There is a problem if you set the selection as follows (as in the video). Then the selection of cells will not be a rectangle. This is due to the fact that when executing cellsInRect, the rowSpan and colSpan attributes of cells are not taken into account.

https://github.com/ProseMirror/prosemirror-tables/assets/57917516/574483c8-34f3-439c-bd98-780142dabc80

Is it a bug that the selection is not rectangles or can I fix this bug?

pekanboy commented 6 months ago

Maybe need reconstruct the rectBetween function https://github.com/ProseMirror/prosemirror-tables/blob/master/src/cellselection.ts#L56