Skip to content

Commit a09811f

Browse files
authored
fix(richtext-lexical): add max-width to tables (temporary fix for overflow). (#8431)
This is a half-baked and temporary solution to #8036 As I said there: - ideally tables would have a horizontal scroll independent of the rest of the document, just like Notion does. - the solution in this PR can make the experience of resizing columns frustrating However, despite that drawback, it is arguably a better behavior than the current one where they can have overflow over the editor container. Until the ideal solution is implemented, let's default to this behavior. ## Before ![image](https://github.com/user-attachments/assets/b2856a3f-4b43-45f0-a7db-00c53fe5c980) ## After ![image](https://github.com/user-attachments/assets/2f60d186-d614-4c72-968c-137820812e11)
1 parent c73f6c7 commit a09811f

File tree

1 file changed

+1
-0
lines changed
  • packages/richtext-lexical/src/features/experimental_table/client/plugins/TablePlugin

1 file changed

+1
-0
lines changed

packages/richtext-lexical/src/features/experimental_table/client/plugins/TablePlugin/index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.LexicalEditorTheme {
44
&__table {
55
border-collapse: collapse;
6+
max-width: 100%;
67
border-spacing: 0;
78
overflow-y: scroll;
89
overflow-x: scroll;

0 commit comments

Comments
 (0)