-
-
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
Font styles are not honored when pasting from MS Word #6165
Comments
I can confirm it. However, should it be handled? It's a bug or feature request? |
I believe this is a bug as preserving font styles should be one of basic functionalities of the PasteFromOffice plugin. NOTE: The problem has also been reported on our support channel. |
Strongly related to:
The latter is in fact what most people would expect. But the former would be useful as well. In other words, we have 3 levels of content filtering:
|
Let's introduce config options for those two features (font family, font size) which will allow developers to disable the value matching. |
This should be an opt-in behaviour. Enabled through a config option. Let's also use that config option in the PFW and PFGDocs documentation pages. |
I wrote two converters that keep values of Model: View:
"<p><span style="font-family:docs-Roboto, Arial;">Roboto: Test – didn't define in config</span></p><p><span style="font-family:Courier New;">Courier New: Test – visible in fontFamily dropdown</span></p>" More or less the same logic could be applied to font-size part of the feature. Is that correct way? |
The most important assumption here is that the feature works in either the "only preconfigured values" or the "any value" modes. Not in both at the same time. If you're in the former more, you have model values working exactly like today. If you switch the mode, the model values need to keep the actual |
The last question – how the font size plugin configuration should look if "any value" mode is enabled? Keeping presets does not seem like a correct way. Could we replace presets with numbers: |
An answer to the question:
Was in the sentence:
This way I went. |
Feature: Introduced an option for both `FontSize` and `FontFamily` plugins that allow preserving any `font-family` and `font-size` values when pasting or loading content. Closes ckeditor/ckeditor5#6165. Closes ckeditor/ckeditor5#2278.
📝 Provide detailed reproduction steps (if any)
article.js
plugins: PasteFromOffice, Font and Highlight (last one just in case).article.js
file. The configuration used should exclude possibility of something not being configured - article.zip.✔️ Expected result
When pasting from MS Word file, font styling should be preserved.
❌ Actual result
No styling gets preserved.
📃 Other details
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: