Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table fixes #61

Merged
merged 4 commits into from
Oct 16, 2023
Merged

Table fixes #61

merged 4 commits into from
Oct 16, 2023

Conversation

thet
Copy link
Member

@thet thet commented Oct 13, 2023

This PR contains these fixes:

fix: Fix problem with table not selectable with ctrl-a

There is a strange problem with tables and selecting all content with ctrl-a. When the last node in the document is a table and the last table cell is empty, then pressing CTRL-a to select everyting only selects the very first node in the document. As soon as one of the conditions - table not the last node or last table cell not empty - is not met, CTRL-a selects all, as expected.

We fix the problem by making sure some content is following the table and add an empty paragraph. When another solution is found we can remove this hack again.

More information here:

maint: Disable horizontal table cell resizing.

We would need quite some extra CSS for the .column-resize-handle for a questionable benefit. Disable it for now until we need it back and find a solution for the missing CSS.

Example for the CSS to be added (touches also table and cell styles):
https://tiptap.dev/api/nodes/table#usage

maint: Use a different webpack dev server port than the default Patternslib one.

thet added 4 commits October 13, 2023 18:00
There is a strange problem with tables and selecting all content with
<ctrl>-<a>. When the last node in the document is a table and the last
table cell is empty, then pressing <CTRL>-<a> to select everyting only
selects the very first node in the document. As soon as one of the
conditions - table not the last node or last table cell not empty - is
not met, <CTRL>-<a> selects all, as expected.

We fix the problem by making sure some content is following the table
and add an empty paragraph. When another solution is found we can remove
this hack again.

More information here:
- ueberdosis/tiptap#2401
- ueberdosis/tiptap#3651
We would need quite some extra CSS for the `.column-resize-handle` for a
questionable benefit. Disable it for now until we need it back and find
a solution for the missing CSS.
Example for the CSS to be added (touches also table and cell styles):
https://tiptap.dev/api/nodes/table#resizable
@thet thet changed the title Fix problem of non-selectable table Table fixes Oct 13, 2023
@thet thet merged commit 4019ad2 into master Oct 16, 2023
1 check passed
@thet thet deleted the table-fixes branch October 16, 2023 08:44
thet added a commit that referenced this pull request Oct 23, 2023
Allow to select all (Ctrl-A, Command-A) with tables in certain
conditions.
Due to a tiptap/ProseMirror bug tables with some empty cells and no
content preceding or following the table, selecting the whole table did
not work. This fix makes sure that a non-empty paragraph is added at the
end, if no other content is present at the end of the document.

Follow-up from:
- #61

More information here:
- ueberdosis/tiptap#2401
- ueberdosis/tiptap#3651
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants