[upstream] Incorrect pasting of lists from Microsoft Word

Created on 8 December 2023, 11 months ago

Note: Drupal.org does not allow uploading .docx files so I saved as a .odt file and then re-saved from that as a .docx file to verify the problem still occurred with the round-tripped file. It does.

Problem/Motivation

When I copy and paste text from a particular Word document, the paste procedure munges list numbering.

Steps to reproduce

1. Launch Word and Chrome in Windows 11
2. In Word, open "test document.docx" (attached to issue)
3. In Chrome, go to https://simplytest.me
4. In the first field, type Drupal
5. Select the most recent version (10.2 rc for me)
6. Log in
7. Click Manage
8. Click Content
9. Click Add content
10. Click Basic page
11. Type title Test paste from Word
12. In Word, use Ctrl-A to select the entire text.
13. Use Ctrl-C to copy the selected text.
14. In Chrome, click in the Body field
15. Use Ctrl-V to paste the selected text.

Expected result: List pasted from Microsoft Word is numbered sequentially 1 and 2.
Actual result: Lists pasted from Microsoft Word gets multiple item numbers 1.

This issue is reproducible on the CKEditor website for Feature-rich editor and Source code editing and HTML support demo pages.

This issue is logged against CKEditor5 as Incorrect handling of nested lists pasted from MS Word #11366. Although the original issue mentions nested lists, it also happens with a single-level list.

Proposed resolution

Maintain Word list item numbering.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

10.2

Component
CKEditor 5 

Last updated 3 days ago

Created by

🇺🇸United States charles belov San Francisco, CA, US

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024