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

Nested lists pasted from Word don't display properly while using Document lists and Indent block #12466

Closed
Mgsy opened this issue Sep 14, 2022 · 7 comments · Fixed by #14758
Closed
Assignees
Labels
package:indent package:list package:paste-from-office squad:core Issue to be handled by the Core team. support:2 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@Mgsy
Copy link
Member

Mgsy commented Sep 14, 2022

📝 Provide detailed reproduction steps (if any)

  1. Enable Document lists, Document list properties, Indent block and Paste from Office.
  2. Paste the content from the example - Lorem ipsum.docx

✔️ Expected result

The list displays properly.

❌ Actual result

There is an additional margin for the nested list items.


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

@Mgsy Mgsy added type:bug This issue reports a buggy (incorrect) behavior. package:list package:paste-from-office support:2 An issue reported by a commercially licensed client. squad:core Issue to be handled by the Core team. labels Sep 14, 2022
@Mgsy Mgsy changed the title Nested lists pasted from Word don't display properly while using Document lists Nested lists pasted from Word don't display properly while using Document lists and Indent block Sep 14, 2022
@Mgsy
Copy link
Member Author

Mgsy commented Sep 14, 2022

Actually, I've just noticed that this issue is caused by the Indent block feature that maintains the margin-left attribute on paragraph.

@Witoso
Copy link
Member

Witoso commented May 8, 2023

Clipboard normalized HTML view after transformation

<ul style="list-style-type:circle">
    <li class="MsoListParagraphCxSpFirst" style="mso-list:l1 level1 lfo1;text-indent:-18.0pt"><span lang="EN-IN"
            style="font-family:" Courier New";mso-fareast-font-family:"Courier New""></span><span lang="EN-US"
            style="mso-ansi-language:EN-US">Lorem ipsum</span><span lang="EN-IN">
            <o:p></o:p>
        </span></li>
    <li class="MsoListParagraphCxSpMiddle" style="mso-list:l1 level1 lfo1;text-indent:-18.0pt"><span lang="EN-IN"
            style="font-family:" Courier New";mso-fareast-font-family:"Courier New""></span><span lang="EN-US"
            style="mso-ansi-language:EN-US">Lorem ipsum</span><span lang="EN-IN">
            <o:p></o:p>
        </span>
        <ul style="list-style-type:square">
            <li class="MsoListParagraphCxSpMiddle"
margin -->   style="margin-left:72.0pt;mso-add-space:auto;mso-list:l1 level2 lfo1;text-indent:-18.0pt"><span
                    lang="EN-IN"
                    style="font-family:Wingdings;mso-bidi-font-family:Wingdings;mso-fareast-font-family:Wingdings"></span><span
                    lang="EN-IN">Lorem ipsum<o:p></o:p></span></li>
            <li class="MsoListParagraphCxSpMiddle"
                style="margin-left:72.0pt;mso-add-space:auto;mso-list:l1 level2 lfo1;text-indent:-18.0pt"><span
                    lang="EN-IN"
                    style="font-family:Wingdings;mso-bidi-font-family:Wingdings;mso-fareast-font-family:Wingdings"></span><span
                    lang="EN-IN">Lorem ipsum<o:p></o:p></span></li>
        </ul>
    </li>
    <li class="MsoListParagraphCxSpMiddle" style="mso-list:l1 level1 lfo1;text-indent:-18.0pt"><span lang="EN-IN"
            style="font-family:" Courier New";mso-fareast-font-family:"Courier New""></span><span lang="EN-IN">Lorem
            ipsum<o:p></o:p></span></li>
    <li class="MsoListParagraphCxSpLast" style="mso-list:l1 level1 lfo1;text-indent:-18.0pt"><span lang="EN-IN"
            style="font-family:" Courier New";mso-fareast-font-family:"Courier New""></span><span lang="EN-IN">Lorem
            ipsum<o:p></o:p></span></li>
</ul>
<p class="MsoNormal"><span lang="EN-IN"></span></p>
<ol>
    <li class="MsoListParagraphCxSpFirst" style="mso-list:l0 level1 lfo2;text-indent:-18.0pt"><span lang="EN-IN"
            style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin"></span><span lang="EN-IN">Min<o:p>
            </o:p></span></li>
    <li class="MsoListParagraphCxSpMiddle" style="mso-list:l0 level1 lfo2;text-indent:-18.0pt"><span lang="EN-IN"
            style="mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin"></span><span lang="EN-IN">Lorem ipsum
            <o:p></o:p></span>
        <ul style="list-style-type:square">
            <li class="MsoListParagraphCxSpMiddle"
                style="margin-left:72.0pt;mso-add-space:auto;mso-list:l0 level2 lfo2;text-indent:-18.0pt"><span
                    lang="EN-IN"
                    style="font-family:Wingdings;mso-bidi-font-family:Wingdings;mso-fareast-font-family:Wingdings"></span><span
                    lang="EN-IN">Lorem ipsum<o:p></o:p></span></li>
            <li class="MsoListParagraphCxSpLast"
                style="margin-left:72.0pt;mso-add-space:auto;mso-list:l0 level2 lfo2;text-indent:-18.0pt"><span
                    lang="EN-IN"
                    style="font-family:Wingdings;mso-bidi-font-family:Wingdings;mso-fareast-font-family:Wingdings"></span><span
                    lang="EN-IN">Lorem ipsum<o:p></o:p></span></li>
        </ul>
    </li>
</ol>

@Witoso
Copy link
Member

Witoso commented May 8, 2023

The potential scope would be dropping margin-left in cases when it's on ol/ul/li (and Paste from Office). This aligns also with @jacekbogdanski goals.

@Witoso
Copy link
Member

Witoso commented May 8, 2023

Potential blocker for @jacekbogdanski's case - we would fix it paste, and they need it for the data pipeline as well.

@Reinmar
Copy link
Member

Reinmar commented Jul 4, 2023

I think the plan minimum is to make IndentBlock stop upcasting margin-left from <li> to a paragraph. Dunno how this could be technically achieved, but logically speaking, it does too eager upcast conversion.

@108signals
Copy link

Would be great to see this addressed. We've had several customers flag this issue

@CKEditorBot CKEditorBot added the status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. label Jul 26, 2023
@Witoso
Copy link
Member

Witoso commented Aug 3, 2023

Scope:

IndentBlock stop upcasting margin-left from <li> to a paragraph.

Rel: #14155

@mmotyczynska mmotyczynska self-assigned this Aug 3, 2023
@CKEditorBot CKEditorBot added status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. and removed status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. labels Aug 6, 2023
niegowski added a commit that referenced this issue Aug 16, 2023
…-from-word-displayed-incorrectly

Fix (indent): Nested lists pasted from Word should be displayed properly in Document Lists. Closes #12466.
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Aug 16, 2023
@CKEditorBot CKEditorBot added this to the iteration 66 milestone Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:indent package:list package:paste-from-office squad:core Issue to be handled by the Core team. support:2 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.

6 participants