Skip to content

List block: preserve original markup when copy/paste for nested UL/LI structures #26713

Open

Description

@noisysocks

From https://core.trac.wordpress.org/ticket/47933.


Pasting a list item into an existing list removes the nested UL markup in the pasted items.

Open a page and start a new unordered list block. For each root-level list item, add one or two second-tier list items. Now select the entire last root-level item and paste it at some point above.

The list item is pasted without its nested UL's, only the LI's. The nested strucure needs to be recreated.

Possibly a different ticket? After doing this a few times it becomes difficult to paste in list text without it ending up in another block. Of course copying the new block into the first results in the above issue.

The request here is simply to ensure that copy/paste of nested UL/LI structures preserves all original markup.

I did look for existing tickets using relevant keywords but did not find this documented. Sorry if this is a dupe.

Activity

  1. noisysocks commented on Nov 5, 2020

    @noisysocks
    MemberAuthor

    In my testing, if I copy a list item and its children and paste it in a new empty paragraph, I get a list but with no nesting.

  2. added
    [Type] BugAn existing feature does not function as intended
    and removed
    Needs TestingNeeds further testing to be confirmed.
    on Nov 5, 2020
  3. self-assigned this
    on May 21, 2021
  4. Thelmachido commented on Aug 3, 2022

    @Thelmachido

    I did a few checks, I can still reproduce part of the issue:

    1. If I copy one of the nested lists To move it to the top it's displayed as expected if I first press enter.
    2. Moving the nested list to a new paragraph removes the markup
    Screen.Recording.2022-08-03.at.13.36.38.mov

    A fix is currently being worked on here

    Gutenberg 13.7.3

    WordPress 6.0.1

  5. added this to the Gutenberg 13.7 milestone on Aug 3, 2022
  6. removed this from the Gutenberg 13.7 milestone on Aug 8, 2022
  7. Mamaduka commented on Sep 2, 2022

    @Mamaduka
    Member

    I think this is still an issue with List v2.

  8. changed the title [-]Gutenberg incorrect paste of list text into list block[/-] [+]List block: preserve original markup when copy/paste for nested UL/LI structures[/+] on Aug 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions