ckeditor4 icon indicating copy to clipboard operation
ckeditor4 copied to clipboard

Pasting ordered lists from MS Word with lower-alpha list style do not work correctly

Open 7c00-oracle opened this issue 4 years ago • 3 comments

Type of report

Bug

Steps to reproduce

  1. Open MS word and create a blank document.

  2. Create an ordered list like below: Hello world a. Bullet point 1     i. Sub bullet point 1     ii. Sub bullet point 2     iii. Sub bullet point 3 b. Bullet point 2 c. Bullet point 3 d. Bullet point 4 e. Bullet point 5 f. Bullet point 6 g. Bullet point 7 h. Bullet point 8 i. Bullet point 9 j. Bullet point 10

  3. Copy all the contents of the document and paste it into CKEditor using Ctrl+V.

I did some debugging and found that the determineListItemValue@plugins/pastefromword/filter/default.js looks only for the attribute cke-list-style-type on the list item's parent but ignores the CSS style attribute style: list-style-type:lower-alpha. Hence, when the value "i" from "Bullet point 9" is encountered, its value is incorrectly set to 1and the resulting list item is displayed as "a.Bullet point 9"

Expected result

Bullet point 9's bullet is correctly copied as is and is listed as "i."

Actual result

Bullet point 9's bullet is listed as "a."

Other details

  • Browser: Chrome 87.0.4280.141 (Official Build) (64-bit)
  • OS: Windows 10 Pro 1903
  • CKEditor version: 4.14.0
  • Installed CKEditor plugins: Standard build plugins

7c00-oracle avatar Jan 27 '21 16:01 7c00-oracle

Attached a recording with STRs, observed results and some breakpoints.

https://user-images.githubusercontent.com/55756984/106025070-6c46e300-60ee-11eb-9893-2d3316608978.mp4

7c00-oracle avatar Jan 27 '21 16:01 7c00-oracle

Hi @7c00-oracle ,

Thank you for your report.
I can confirm this incorrect behavior for 4.14.0, but also for editors from 4.13.0 to 4.16.0 so it is non discovered before bug.

sculpt0r avatar Jan 28 '21 20:01 sculpt0r

Hi @sculpt0r / @jacekbogdanski Is this issue fixed now? Pls let us know the current state of this issue. Thanks.

sudheerb avatar Oct 21 '22 09:10 sudheerb