Friday, April 11, 2025
1 change · saas-18.1
Enhancements to existing features
The HTML editor now preserves text styling when users press Enter, making edited content more consistent and reducing formatting cleanup. It also improves cursor behavior and removes empty hidden formatting elements, which helps avoid confusing editing issues.
Original PR description
Current behavior before PR: - When pressing Enter, the styles applied to the text were not carried over to the newly created line. - When a nested inline element was removed during the editor's…
Current behavior before PR: - When pressing Enter, the styles applied to the text were not carried over to the newly created line. - When a nested inline element was removed during the editor's cleaning process, its parent inline element (if also empty) was not removed. This caused the that inline element to become inaccessible. - When pressing `shift+enter` within an inline element with a subsequent sibling `<br>`, a new line break `<br>` is inserted within the inline element. However, the cursor appears outside the inline element. Desired behavior after PR is merged: - Now, when Enter is pressed, if styles are applied to the text, those styles will be carried over to the newly created line. - Now, during the editor cleaning process, if an empty inline element is removed, all of its empty ancestor inline elements are also removed. - Now, when pressing `shift+enter` inside the inline element with a next sibling `<br>`, a new line break `<br>` is inserted inside the inline element. Additionally, a feff character is inserted after the `<br>` tag to ensure that the cursor remains inside the inline element. task-2822187