[lexical-table] Support for vertical cell writing
Resolves: #4437
https://github.com/user-attachments/assets/6fc1d1a8-2302-4a39-867b-c39c5c8fa54b
Mechanics: Chaging the CSS attribute writing-mode to 'vertical-rl' or 'vertical-lr' makes the text direction vertical. Once the text is vertical, most people would center it, to make this work seamlessly, we need to convert the text alignment 'left' to 'bottom', 'center' to 'middle', right to 'top', etc. and apply on TableCell-level. I've updated the FORMAT_ELEMENT_COMMAND in a separate PR (#6582) so we don't have the TableCell coupled to the paragraph within.
if no writing-mode is defined - assume the default horizontal, if writing-mode is present validate only 'vertical-rl' and 'vertical-lr' and ignore all the other deprecated properties as per https://developer.mozilla.org/en-US/docs/Web/CSS/writing-mode#values
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| lexical | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 1, 2024 7:10am |
| lexical-playground | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 1, 2024 7:10am |
size-limit report 📦
| Path | Size |
|---|---|
| lexical - cjs | 29.38 KB (0%) |
| lexical - esm | 29.22 KB (0%) |
| @lexical/rich-text - cjs | 37.87 KB (0%) |
| @lexical/rich-text - esm | 31.08 KB (0%) |
| @lexical/plain-text - cjs | 36.45 KB (0%) |
| @lexical/plain-text - esm | 28.44 KB (0%) |
| @lexical/react - cjs | 39.64 KB (0%) |
| @lexical/react - esm | 32.52 KB (0%) |
@etrepum can you give this one a look, if you are OK with the direction.
The quality of the PR wasn't bad, but no time to finish it. Someone else might use it as a starting point later on.