Skip to content

Raw Handling: List pasted from Word gets lost #46832

Closed

Description

@Soean

Description

When I paste a list from a Word document, it gets lost.

Word:

Example file
example.docx

Received HTML:

<h3><a name="_Hlk64885792">This is a headline?<o:p></o:p></a></h3>

<p class=MsoNormal><span style='mso-bookmark:_Hlk64885792'>This is a text:<o:p></o:p></span></p>

<p class=MsoListParagraphCxSpFirst style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><span
style='mso-bookmark:_Hlk64885792'><![if !supportLists]><span style='font-family:
Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]>One <o:p></o:p></span></p>

<p class=MsoListParagraphCxSpMiddle style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><span
style='mso-bookmark:_Hlk64885792'><![if !supportLists]><span style='font-family:
Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]>Two<o:p></o:p></span></p>

<p class=MsoListParagraphCxSpLast style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><span
style='mso-bookmark:_Hlk64885792'><![if !supportLists]><span style='font-family:
Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]>Three<o:p></o:p></span></p>

<span style='mso-bookmark:_Hlk64885792'></span>

<p class=MsoNormal><a name="_Hlk64885540">Lorem Ipsum. </a><o:p></o:p></p>

<p class=MsoNormal><span style='font-family:"Calibri",sans-serif;mso-ascii-theme-font:
minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin'><o:p>&nbsp;</o:p></span></p>

Received plain text:

 This is a headline?
This is a text:
•	One 
•	Two
•	Three
Lorem Ipsum.

Processed HTML piece:

 <h3><a>This is a headline?</a></h3><p>This is a text:</p><p><a>Lorem Ipsum.</a></p>

Activity

  1. changed the title [-]List pasted from Word is lost[/-] [+]List pasted from Word gets lost[/+] on Dec 30, 2022
  2. added
    [Type] Bug
    on Jan 3, 2023
  3. kathrynwp commented on Jan 3, 2023

    @kathrynwp

    related: #46803

  4. changed the title [-]List pasted from Word gets lost[/-] [+]Raw Handling: List pasted from Word gets lost[/+] on Aug 3, 2023
  5. added
    [Block] List
    on Aug 3, 2023
  6. moved this to Needs Dev / Todo in WordPress 6.4 Editor Taskson Aug 30, 2023
  7. t-hamano commented on Sep 16, 2023

    @t-hamano
    Contributor

    I was able to reproduce the exact same problem using the Word file attached by @Soean.

    However, when I created a new Word file on my machine and created the exact same content, it pasted correctly. Could it be related to the OS, Office version, or document settings on which the Word file was created? 🤔

    f91f989a321bf2c827f6dd476b2bebbe.mp4
  8. added
    [Status] In Progress
    on Oct 6, 2023
  9. ellatrix commented on Oct 6, 2023

    @ellatrix
    Member

    Thanks for providing the received HTML. #55127 should fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Block] List[Feature] Paste[Status] In Progress[Type] Bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions