Opened 9 years ago
Closed 9 years ago
#16821 closed Bug (fixed)
Extraneous spans with height style stacked when pasting from Word
| Reported by: | Tade0 | Owned by: | Tade0 |
|---|---|---|---|
| Priority: | Nice to have (we want to work on it) | Milestone: | CKEditor 4.7.0 |
| Component: | Plugin : Paste from Word | Version: | 4.7.0 |
| Keywords: | Cc: |
Description
When encountering an element that has multiple styles the PFW plugin creates a stack of span elements each having one of these styles.
This way this:
<span style="font-size: 50px; color: red; font-weight: bold">Test</span>
Becomes this:
<span style="font-size: 50px">
<span style="color: red">
<span style="font-weight: bold">Test</span>
</span>
</span>
Some styles should not be stacked though - one of them is the height style.
Problem is - this happens.
Change History (6)
comment:1 Changed 9 years ago by
| Component: | General → Plugin : Paste from Word |
|---|
comment:2 Changed 9 years ago by
| Priority: | Normal → Nice to have (we want to work on it) |
|---|---|
| Status: | new → confirmed |
| Summary: | "height" style gets stacked in spans in Paste from Word(PFW) → "height" style gets stacked in spans in Paste from Word |
comment:3 Changed 9 years ago by
comment:4 Changed 9 years ago by
This is pretty unusual: According to the editor.filter.allowedContent property in the tests a td with a height style should be allowed(true in the manual test), and yet it is not present in the final output.
EDIT: nevermind, I misinterpreted removing spans with height as removing height altogether.
comment:5 Changed 9 years ago by
| Owner: | set to Tade0 |
|---|---|
| Status: | confirmed → review |
Adjusted pushing styles lower, updated unit tests.
Changes pushed to branch:t/16821.
comment:6 Changed 9 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | review → closed |
| Summary: | "height" style gets stacked in spans in Paste from Word → Extraneous spans with height style stacked when pasting from Word |
Code change was OK, but there was no manual test provided.
I added the manual test, and rebased the branch. While rebasing there were tons of conflicts, since there were some massive changes on master related to PFW lately, so I have recreated the fixtures.
Fixed with git:58726c64b1985769caacb626282f05d2e7b24611, merged to major.

I'm getting some weird behaviour when disabling stacking for this style(it gets removed - probably by ACF which does not allow such a style in inline elements).
Investigating.