The issue involves modifying block behavior to retain styles, which requires understanding Gutenberg's block handling logic.
The issue describes a scenario where styles (alignment, font size) are not retained when hitting enter at the end of a styled paragraph. The task involves modifying the block splitting logic to retain these styles, similar to how it works when splitting in the middle of content. The main challenge is ensuring consistency and handling edge cases.
(Not sure if this can be considered a bug or enhancement.)
When hitting enter at the end of a paragraph that has particular styles or alignment applied, those styles are not applied to the next inserted paragraph. This can make editing a little slow, the user is forced to reapply styles to new blocks, and it's especially noticable when adding to existing content, like that from a pattern:
https://github.com/user-attachments/assets/00bb33e1-ea7b-48f7-a48d-7cd9fa7e00a6
Should the existing styles be retained? This is something that does already happen when a paragraph is split in the middle of content, but perhaps there are additional considerations when a paragraph is split at the end.
No response
No response
Claim this issue to let others know you're working on it. You'll earn 20 points when you complete it!