Files
notesnook/packages
01zulfi 573b24f28f editor: fix heading align (#8996)
this reverts all the custom layout based on divs & spans and moves back to using pseudo element for the expand/collapse icon.

There were a few problems with the previous logic:

1. We had to write custom logic for text alignment (not a huge deal but it could cause bugs down the line)
2. Aligning the icon properly was hit or miss. We were using flex which meant for multi line headings, the icon appeared way to the left instead of right next to the end of the heading.
3. The styling css for the previous logic was MASSIVE and handled lots of cases which meant more maintenance burden for us.

The new logic is simpler:

1. Use `::after` pseudo element for the expand/collapse icon. This works very nicely on Android.
2. Use selection range on the heading to compute bounding rects for each line. It's a bit hacky but works for both LTR & RTL headings.

---------

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
Co-authored-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2025-11-27 11:43:27 +05:00
..
2025-11-04 10:35:34 +05:00
2025-11-27 11:04:57 +05:00
2025-11-27 11:43:27 +05:00
2025-11-07 19:26:32 +05:00
2025-10-08 08:42:00 +05:00
2025-10-08 08:42:00 +05:00
2025-10-08 08:42:00 +05:00
2025-10-08 08:42:00 +05:00