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

List block: pasting a single (Markdown) item from a list converts item to a paragraph #33312

Open
Tracked by #53305
pansamolot opened this issue Jul 8, 2021 · 4 comments
Labels
[Block] List Affects the List Block [Feature] Paste Needs Dev Ready for, and needs developer efforts [Type] Bug An existing feature does not function as intended

Comments

@pansamolot
Copy link

Description

When you paste an ordered list from i.e. Notepad, Gutenberg handles this gracefully (and changes Paragraph block into List block automatically) only, if you are pasting a list having more than one item.

If you're pasting just a single line, with any number in the beginning then block remains as Paragraph (maybe by design), but the number is strip-off (certainly a bug).

Step-by-step reproduction instructions

  1. Start a new blog post
  2. Add a new Paragraph block
  3. Copy single line with a number in the beginning from any source
  4. Paste it to that block

Expected behaviour

Pasted text is exactly the same as copied from source (i.e. with number)

Actual behaviour

Numbering is stripped off.

Screenshots

numbers

WordPress information

  • WordPress version: 5.7.2
  • Gutenberg version: 11.0.0
  • Are all plugins except Gutenberg deactivated? No
  • Are you using a default theme (e.g. Twenty Twenty-One)? No

Device information

  • Device: Notebook PC, i7-7600U CPU, 8 GB RAM, brand new, very few apps installed, non except browser working,
  • Operating system: Windows 10.10094
  • Browser: Microsoft Edge 91.0.864.64
@kevin940726
Copy link
Member

I can reproduce this too.

@kevin940726 kevin940726 added [Block] Paragraph Affects the Paragraph Block [Type] Bug An existing feature does not function as intended labels Jul 20, 2021
@pansamolot
Copy link
Author

Is there any update or progress on this? Will there be any pull request / bug-fix to this?

@annezazu
Copy link
Contributor

I can replicate this with 6.3 RC1.

@annezazu annezazu changed the title Gutenberg 11 ignores line numbers, if single line is pasted List block: pasting a single item from a list converts item to a paragraph Jul 19, 2023
@annezazu annezazu added the [Feature] List View Menu item in the top toolbar to select blocks from a list of links. label Jul 19, 2023
@annezazu annezazu added the Needs Dev Ready for, and needs developer efforts label Aug 3, 2023
@jordesign jordesign added the [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... label Aug 18, 2023
@annezazu annezazu moved this to Needs Dev / Todo in WordPress 6.4 Editor Tasks Aug 30, 2023
@t-hamano
Copy link
Contributor

I was able to reproduce it too. Looking at the browser console, the HTML seems to be parsed correctly as a list, but for some reason, it is converted to a paragraph block only if it is a single line.

eb79f3f67d3e7eb7cc1312df6039826a.mp4

@ellatrix ellatrix added [Block] List Affects the List Block and removed [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Feature] List View Menu item in the top toolbar to select blocks from a list of links. [Block] Paragraph Affects the Paragraph Block labels Jul 12, 2024
@ellatrix ellatrix changed the title List block: pasting a single item from a list converts item to a paragraph List block: pasting a single (Markdown) item from a list converts item to a paragraph Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] List Affects the List Block [Feature] Paste Needs Dev Ready for, and needs developer efforts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

7 participants