You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to distribute cell widths using percentage-based sizing within a table that always has a width of 100%. However, the current Lexical Table Plugin (@lexical/table) is coded to use pixel units, and there doesn't seem to be a way to change that.
From what I can tell after reading through the source code, it seems like the only option is to create a custom plugin that uses percentage-based units instead of using the official @lexical/table plugin.
It might be possible to work around this by setting a max-width to prevent the table from overflowing its container, but that doesn’t solve the underlying issue.
If there’s a way to change the unit used by the Table Plugin from pixels to percentages, I’d really appreciate any guidance.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to distribute cell widths using percentage-based sizing within a table that always has a width of 100%. However, the current Lexical Table Plugin (@lexical/table) is coded to use pixel units, and there doesn't seem to be a way to change that.
lexical/packages/lexical-table/src/LexicalTableNode.ts
Line 77 in a51b69d
lexical/packages/lexical-table/src/constants.ts
Line 9 in a51b69d
lexical/packages/lexical-table/src/LexicalTableNode.ts
Line 628 in a51b69d
lexical/packages/lexical-table/src/LexicalTableCellNode.ts
Line 142 in a51b69d
lexical/packages/lexical-table/src/LexicalTableCellNode.ts
Line 182 in a51b69d
lexical/packages/lexical-table/src/LexicalTableCellNode.ts
Line 337 in a51b69d
From what I can tell after reading through the source code, it seems like the only option is to create a custom plugin that uses percentage-based units instead of using the official @lexical/table plugin.
It might be possible to work around this by setting a
max-widthto prevent the table from overflowing its container, but that doesn’t solve the underlying issue.If there’s a way to change the unit used by the Table Plugin from pixels to percentages, I’d really appreciate any guidance.
Beta Was this translation helpful? Give feedback.
All reactions