Open Ahsan-Ullah1871 opened 7 months ago
the same problem too
This is to do with column resizing: https://github.com/ueberdosis/tiptap/blob/ce141c2e69ddc47c29658b9a6ad4ee16607774bb/packages/extension-table/src/table.ts#L434
One workaround mentioned has been to render the editor in editable mode and then turn off editable with editor.setEditable(false)
(as per https://github.com/ueberdosis/tiptap/issues/5365#issuecomment-2266652338)
Tables are difficult to get right, we hope to improve them in a v3
This is to do with column resizing:
One workaround mentioned has been to render the editor in editable mode and then turn off editable with
editor.setEditable(false)
(as per #5365 (comment)) Tables are difficult to get right, we hope to improve them in a v3
thanks for your help @nperez0111
Which packages did you experience the bug in?
@tiptap/extension-table
What Tiptap version are you using?
2.2.2
What’s the bug you are facing?
Problem Description:
I am encountering an issue related to the responsiveness of a table, particularly when transitioning between editable and read-only modes. In editable mode, I can successfully create a long table that is responsive and allows for horizontal movement. However, upon switching to read-only mode, the table loses its responsiveness, and horizontal scrolling becomes unattainable.
Details:
Upon closer inspection, I have identified a key difference in the HTML structure between editable and read-only modes. Specifically, in editable mode, a div with the className "tableWrapper" precedes the table tag. This div includes a crucial CSS property for overflow, contributing to the responsive behavior of the table. However, in read-only mode, this div with the className "tableWrapper" is absent, leaving the table unresponsive.
Problem Screenshots:
Question:
I am seeking guidance on how to make the table responsive in read-only mode. Is there a method to enable the presence of the div with the className "tableWrapper" when the table is in read-only mode? Alternatively, are there other approaches to ensure the responsiveness of the table in read-only mode?
What browser are you using?
Chrome
Code example
No response
What did you expect to happen?
The expectation is that the table should demonstrate consistent responsiveness across both editable and read-only modes. Users should be able to horizontally scroll through the table content even when in read-only mode.
Anything to add? (optional)
No response
Did you update your dependencies?
Are you sponsoring us?