-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Paste from Word: option to parse OpenOffice/LibreOffice Writer inserts #2374
Comments
Hello, I gave it a try and it seems like it works as expected - at least for very simple LibreOffice content. The proposed regex should also contain I like the idea to integrate OpenOffice/LibreOffice format into However, I think it should work out of the box, without additional config option. |
Nice to hear that. Support by default works too.
Almost my case. Spent hours debugging a custom |
I can confirm that Libre Office adds a meta tag allowing us to identify it, like so: <meta name="generator" content="LibreOffice 6.0.5.2 (Windows)"/> Based on what I have tested the markup pasted from LibreOffice works pretty well already in CKE4. I checked font color, bold, underline, font size, lists, lists with roman markers - the formatting is retained. So we'd like to ask the community what kind of features, that currently are not retained, would be valuable for end users? |
Wonderful! But what if the browser rejects paste? And ansers "Press CTRL-V to insert, your browser does not support paste via button" etc.... ? I tried FF, Chrome, EDGE each one with its actual version |
@DonWolli it works like that now. Instead of pasting into a dedicated dialog you'll need to ctrl+v into the editor itself. This thread is about expanding the number of programs the pasted content from which CKEditor automatically detects. |
and the pasted content leaves untouched with all that unnessacary word stuff ... thats NOT what I want, I want the same functionality as before ... |
@DonWolli you can take the But that is not a bug, nor it's the browser's fault. It's a new behavior of the |
Since we will be starting to work on this issue, let's sum up what's needed. Let's start with Libre Office support only for now (the markup is probably very similar in both, but Libre Office get much more development during recent years and seems to be more popular), then we can see how compatible it is with Open Office if needed. I see that we will be able to reuse some pasting filters we already have in place (assumed based on #2374 (comment)), but I will be for introducing it as a new plugin - same as we have As for testing how the plugin performs, it would be good to reuse our two sample documents (ofc copied/recreated in Libre Office) which we have in Paste from Word / Google Docs samples as they cover variety of most common cases. |
There appeared some troubles when I dived deeper into this issue. For examples:
However there is also part of a text which also has applied black color: It seems to be optimal to remove such styles before those are transofmred with PFW. However it's not so simple as adding new content handler with higher priority. PFW filter during a transformation obtains the fresh copy of the clipbaord data, so all transformations, made before it, are lost. That's why there is required a more bound solution which will listen on Even when this case will be fixed, there are still other other aspects to fix:
So there are some cases which have quite a huge impact on this issue. The solution would be relatively easy if there would be a lack of support for PFLO under IE11 and Safari. Supporting all browsers requires much more cases to cover with different editor setups. |
This feature was introduced in #3624 and will be released in 4.14.0. |
Type of report
Feature request
Provide description of the new feature
At the moment the Paste from Word plugin automatically detects only if the content being pasted is from the MS' application. It would be nice to have an option to detect content from other similar programs, namely Writer from OpenOffice and LibreOffice packages. I understand the documents might have different markup rules and thus pasting from them as is would cause bugs (I take it that's why they are not supported officially - because that would require extra work on adjusting the code). That's why I think
an config option would do. Like
config.pasteFromWord_detectOpenOffice = true/false
. Or even multiple options, as I don't know if the makup LibreOffice produces is substantially different and if it has different meta. So that a user could decide if he/she's ok with possible downsides.Adding such detect ability is pretty easy. Here resides the regex pattern:
which, if changed like so:
will allow to catch content that comes from OOo Writer.
The text was updated successfully, but these errors were encountered: