Skip to content

Content Model: Move default format back to DIV#1819

Merged
JiuqingSong merged 5 commits into
masterfrom
u/jisong/formatondiv2
May 23, 2023
Merged

Content Model: Move default format back to DIV#1819
JiuqingSong merged 5 commits into
masterfrom
u/jisong/formatondiv2

Conversation

@JiuqingSong

@JiuqingSong JiuqingSong commented May 23, 2023

Copy link
Copy Markdown
Collaborator

We have found some issues that can cause format lost during editing. One of the reason is with ExperimentalFeature DefaultFormatInSpan, we always apply default format to a inner SPAN instead of the DIV. So during some editing operation, or some legacy roosterjs API, it can cause the content is located outside of the format SPAN.

In that change I revert this feature as well as another experimental feature DefaultFormatOnContainer to not apply default format to editor DIV since it can hide this problem.

For container model, we will also apply default format to paragraph when write back, and no need to write the same format inside SPAN if it is not changed.

Before change:
image

After change:
image

@JiuqingSong JiuqingSong changed the title Move default format to DIV (2) Move default format to DIV May 23, 2023
@JiuqingSong JiuqingSong reopened this May 23, 2023
@JiuqingSong
JiuqingSong marked this pull request as ready for review May 23, 2023 18:44
@JiuqingSong JiuqingSong changed the title Move default format to DIV Content Model: Move default format back to DIV May 23, 2023
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