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

WYSIWYG Text direction & Alignment controls can fail when set in nested structures #4843

Closed
ssddanbrown opened this issue Feb 14, 2024 · 1 comment

Comments

@ssddanbrown
Copy link
Member

ssddanbrown commented Feb 14, 2024

Specifically in tables where there may be subformatting.
Especially when copied in from other apps like word which may bring more complex content structures.

Probably best if, on text direction or alignment control usage, we traverse to closest block element to apply it, then remove all alignment/direction (attribute and styles) of all child elements, to keep these block-level.

Additionally, text direction controls don't currently apply during multi-table cell selections, only the first.

@ssddanbrown ssddanbrown added this to the Next Feature Release milestone Feb 14, 2024
ssddanbrown added a commit that referenced this issue Feb 20, 2024
- Removes 'span' from being a valid part of alignment formats so it's
  not used to align contents, since it's going to mostly be an inline
  format, wheras you'd really want alignment on the parent block.
- Adds direction cleaning to all direction change events, to remove
  direction styles and child direction controls which may complicate
  matters and cause direction changes not to show.
- Makes text direction controls work with table cell range selections,
  which TinyMCE does not consider by default, via manual handling.

For #4843
@ssddanbrown
Copy link
Member Author

Addressed in c290d01.
Probably not perfect, but now combined with the better clear formatting controls, this should provide the user much more control, or ways to clean & gain control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant