StackExchange / StackExchange/Stacks-Editor
bug(rich-text) Pasting text from one list into another inserts as sub-bullet
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 437
- Forks
- 61
- Avg merge
- 16h 2m
- Merged PRs (30d)
- 8
Description
Describe the bug
Copying text from one list bullet to another inserts the pasted text as a new sub-bullet.
To Reproduce
- in rich text mode, add list items
- copy one of them, or even a fragment of one (not the entire text from the list item)
- paste it into a different list item
- observe that it pastes as a sublist item, on the next level
Expected behavior
List items are pasted in as text. Copying multiple list items and pasting them in should be equivalent to pasting in multiple lines of text (this is how it works in Google Docs). Pasting in one list item or a fragment of one list item should just add it as text to the spot where it is being pasted.
Screenshots

Desktop (please complete the following information):
- Windows Chrome 103
- MacOs Firefox
Additional context
MSE Post
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the rich text mode and reproduce the issue by copying a list item or fragment into another list item. Check the paste handling involved and compare single-item, fragment, and multiple-item pastes with the expected plain-text and multiple-line behavior. Done means pasted content no longer becomes an unintended sublist.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100