Opened 12 years ago
Last modified 8 years ago
#9991 closed Task
Paste from word should only normalize input data — at Version 18
Reported by: | Piotrek Koszuliński | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.6.0 |
Component: | Plugin : Paste from Word | Version: | |
Keywords: | Drupal | Cc: | wim.leers@… |
Description (last modified by )
Transformations and clean up are done by #9829 and #9989. Thus, PFW has to be rewritten so it won't double these core features.
Spec: https://gist.github.com/Reinmar/cc012b20bf37be84a523 (WIP)
Change History (18)
comment:1 Changed 12 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 12 years ago by
Type: | Bug → Task |
---|
comment:3 Changed 12 years ago by
Description: | modified (diff) |
---|
comment:4 Changed 12 years ago by
comment:5 Changed 12 years ago by
Milestone: | CKEditor 4.2 |
---|
This ticket is about rewriting PFW from scratch and this is immense amount of work, so it will not be included in 4.2.
comment:6 Changed 12 years ago by
Description: | modified (diff) |
---|
comment:8 Changed 12 years ago by
<td style="background:Yellow">...</td> or: <span style="background:Yellow">...</span>
We need transformation that will extract background-color which we understand, from background which we remove. We should add these transformations for more CSS properties. I'm not only sure how can we automatically create them from e.g. config.colorButton_backStyle
. We may need to add new settings for styles which would guide the filter.
Duplicate: #10364.
comment:9 Changed 12 years ago by
Another rooms for improvements can be find in the way we fixed #10348:
- transformations could accept elements list instead of one element only,
- transformations for align attribute on blocks is needed.
comment:11 Changed 11 years ago by
Milestone: | → CKEditor 4.4 |
---|
comment:12 Changed 11 years ago by
Component: | Core : Pasting → Plugin : Paste from Word |
---|
comment:13 Changed 11 years ago by
We’re not supposed to drastically change the way things are done right now. Most of the changes are to happen in the cleanup logic.
The following are some notes about how things (will) work.
- Basic workflow:
- Listens for the “paste” with priority “3”
- Sniffs the paste date for word stuff.
- If from word, calls CKEDITOR.cleanWord.
- Updates the paste event data with the cleaned data.
- It allows to have custom "cleanWord” implementations through configuration and on-demand file loading. I’m unsure about the point about this as one could eventually simply write a plugin that would override the default plugin behavior. Anyway, we don’t have to change this right now and it can be a v5 thing.
- The default cleanWord implementation will not do the deep cleanup it does today. It’ll instead “normalize” the HTML in a way that it has proper semantics, using proper HTML features. The cleanup part will be left to ACF. This is all about this ticket, in fact.
- The default cleanWord implementation is based on data processing, mainly.
- What to do with the current configurations:
- pasteFromWordPromptCleanup: I don’t feel that this is necessary any more… actually it may still exist but by default it may depend on ACF, if it’s enabled.
- pasteFromWordRemoveFontStyles: we can keep this
- pasteFromWordNumberedHeadingToList: ???
- pasteFromWordRemoveStyles: I have the impression that this is not needed any more. Only if we want to keep it so one could decide to have cleaner paste from Word, even if the editor support style features.
So the current idea is developing tests and write the cleanup logic from scratch, reusing what’s is reusable from the current implementation.
comment:14 Changed 11 years ago by
Any idea on the ETA?
This is one of the things we need to ship Drupal 8. There's no beta yet, so there's still some time, but we definitely need to close https://drupal.org/node/1955300 before release.
comment:15 Changed 11 years ago by
Milestone: | CKEditor 4.4 → CKEditor 4.5 |
---|
The ETA is 4.5 (so July or August - we may still change ETA for 4.5). More delay is very unlikely because of our plans regarding 4.5 and 5.
comment:16 Changed 10 years ago by
Milestone: | CKEditor 4.5.0 → CKEditor 4.6.0 |
---|
We're sad when we have to do that, but we weren't able to find resources for Paste From Word for the last couple of months. We have to release the drag and drop and file upload support which is ready for in ~75% as soon as possible, so I'm postponing PFW to the next major release.
comment:17 Changed 9 years ago by
This may be still a useful resource https://msdn.microsoft.com/en-us/library/Aa155477?f=255&MSPPError=-2147217396
comment:18 Changed 9 years ago by
Description: | modified (diff) |
---|
I wrote a first draft of the spec (or rather guidelines): https://gist.github.com/Reinmar/cc012b20bf37be84a523
Adding #10267 as a test case for this issue.