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

Remove style "white-space" from empty paragraph #2820

Merged
merged 2 commits into from
Oct 5, 2024

Conversation

JiuqingSong
Copy link
Collaborator

When normalize a paragraph (e.g. triggered from ENTER key), if it is empty (has BR or selection marker only), we should not keep its "white-space" style if any. So that the new empty paragraph can be just a normal paragraph.

@juliaroldi
Copy link
Contributor

When normalize a paragraph (e.g. triggered from ENTER key), if it is empty (has BR or selection marker only), we should not keep its "white-space" style if any. So that the new empty paragraph can be just a normal paragraph.

Is this changing preventing a bug?

@JiuqingSong
Copy link
Collaborator Author

When normalize a paragraph (e.g. triggered from ENTER key), if it is empty (has BR or selection marker only), we should not keep its "white-space" style if any. So that the new empty paragraph can be just a normal paragraph.

Is this changing preventing a bug?

Yes. User pasted something with such style, then press ENTER, this style is copied to the new paragraph. If the new paragraph is empty, the layout will be strictly related to the HTML content. A hidden line break will cause extra empty when layout.

@JiuqingSong JiuqingSong merged commit 2d90d5c into master Oct 5, 2024
7 checks passed
@JiuqingSong JiuqingSong deleted the u/jisong/cleanupwhitespace branch October 5, 2024 04:10
BryanValverdeU added a commit that referenced this pull request Oct 11, 2024
* Add a ID to the TempDiv, to be able to identify on blur was caused for copy/cut #2813

* delete image range

* remove selection

* fix build

* WIP

* clean info when delete image

* WIP

* WIP

* add unit tests

* nit

* Remove style "white-space" from empty paragraph (#2820)

* Remove white-space style for empty paragraph

* improve

* Fix #2804 (#2821)

* touch images

* Do not treat image without src as empty image (#2823)

* update versions.json

* update versions

---------

Co-authored-by: Julia Roldi (from Dev Box) <[email protected]>
Co-authored-by: Julia Roldi <[email protected]>
Co-authored-by: Jiuqing Song <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants