Skip to content
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-office: Losing indent level for nested lists of different type (numbered, bullet) #7805

Closed
mmichaelis opened this issue Aug 7, 2020 · 5 comments · Fixed by #8417
Assignees
Labels
package:list package:paste-from-office squad:core Issue to be handled by the Core team. support:3 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@mmichaelis
Copy link

📝 Reproduction Steps

  1. Created a nested list in MS Word (Office 365) as follows:

    • Lorem
    • Ipsum
      1. Dolor
      2. Sit
    • Amet

    See Copy-Paste-Mixed-List-Issue-CKEditor.docx (first list shows error; second list works).

  2. Copy the entire list

  3. Paste it for example to CKEditor 5 demo

✔️ Expected result

Just as all other nested lists (even for mixed outer numbered, inner bullet) the nested indentation levels should be kept as is.

❌ Actual result

Indentation level of nested list is set to 0:

  • Lorem
  • Ipsum
  1. Dolor
  2. Sit
  • Amet

📃 Other details

  • Browser: Chrome
  • OS: Windows 10
  • Office: MS Word; Office 365
  • CKEditor version: Most recent (CKEditor 5 demo) as well as custom using "@ckeditor/ckeditor5-paste-from-office": "^20.0.0"
  • Installed CKEditor plugins: "@ckeditor/ckeditor5-paste-from-office": "^20.0.0"

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@mmichaelis mmichaelis added the type:bug This issue reports a buggy (incorrect) behavior. label Aug 7, 2020
@FilipTokarski
Copy link
Member

Hi, thanks for the report. I confirm this bug. However it seems to occur only if you have numbered items inside bulleted list, otherwise the indentation works fine:

word3

  • occurs also on older versions
  • browser: any

@mlewand mlewand added this to the backlog milestone Aug 17, 2020
@jswiderski jswiderski added the support:1 An issue reported by a commercially licensed client. label Oct 7, 2020
@Reinmar Reinmar added the squad:core Issue to be handled by the Core team. label Oct 8, 2020
@AnnaTomanek AnnaTomanek modified the milestones: backlog, iteration 38 Oct 26, 2020
@pomek pomek self-assigned this Oct 27, 2020
@pomek
Copy link
Member

pomek commented Oct 29, 2020

Lists in Word use the id property for marking the whole list as a structure. It means that nested lists have the same value of the property as their parents.

All list items have the same id:

image

However, for some, unknown reason, the first list in the attached document has mixed id values (a parent and a nested list are not the same).

I would say: I can reproduce the issue and I can't reproduce the issue at the same time. It depends on which list I use.

The list used for testing:

• Lorem
    1. Dolor
    2. Sit
• Ipsum

If I use the attached document as a source for testing, I am able to reproduce the issue. However, if I create a new list with the same structure, the issue does not occur.

I guess, something wrong happened with the existing list in the Word. I can't reproduce the issue when I create a fresh list.

@Reinmar
Copy link
Member

Reinmar commented Nov 2, 2020

Could you check this in CKEditor 4? If that works there, then perhaps we need to change the way how we process nested lists in PFO in CKE5.

@mmichaelis
Copy link
Author

Comparing

CKEditor 4 works without problems regarding the given example document (created with MS Office 365, if it matters). CKEditor 5 demo still shows the described problem.

@jodator
Copy link
Contributor

jodator commented Nov 4, 2020

Findings from the other PR: #8390 (comment) & the rest of the conversation.

jodator added a commit that referenced this issue Nov 5, 2020
Fix (paste-from-office): Improved a mechanism that detects nested lists while pasting from Word. In some scenarios, pasting nested lists could produce invalid results in the editor. Closes #7805.
@lslowikowska lslowikowska added support:3 An issue reported by a commercially licensed client. and removed support:1 An issue reported by a commercially licensed client. labels Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:list package:paste-from-office squad:core Issue to be handled by the Core team. support:3 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants