-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
#7275: Paste from Office should use the same instance of StylesProcessor as editor #7313
Conversation
cc @ckeditor/qa-team |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without digging much into it. The PR found the real problem there.
This was because the MSWord normalizer creates a new View document to parse clipboard content despite the fact that we already have one created by Clipboard. The problem with this approach is that we have to take care of proper view document creation in two places (in the editor and here). AFAICS this relates to:
- proper styles processor definitions must be passed from editor document
- the DOM converter must use the same
blockFillerMode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be a bit more fluent about this - As I still remember more or less what is happening in PFO and styles normalization the PR solution is OK 👍 but I didn't check the tests, comments, etc. So it might require double check.
ps.: I've just saw the missing inheritDoc
annotation in MSWordNormalizer
;)
packages/ckeditor5-paste-from-office/src/normalizers/mswordnormalizer.js
Show resolved
Hide resolved
I checked it and pasted content looks pretty good now. It solves the latest issues with highlight and background colors in tables pasted from Word 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dobule checked ;) AFAICS the other new StylesProcessors()
usages are legit.
Fix (paste-from-office): The Paste from Office feature should use the same instance of `StylesProcessor` as the view document. Closes #7275.
Suggested merge commit message (convention)
Fix (paste-from-office): Paste from Office should use the same instance of StylesProcessor as editor. Closes #7275.
Additional information