[Bug]: Pasting editor content starting with a list-item back into the same editor does not preserve list-markers when nodes are marked as defining #5908
Labels
Category: Open Source
The issue or pull reuqest is related to the open source packages of Tiptap.
Type: Bug
The issue or pullrequest is related to a bug
Affected Packages
core, extension-paragraph, extension-bullet-list, extension-ordered-list
Version(s)
latest (2.10.3)
Bug Description
When multiple nodes are declared as defining, specifically paragraph and list nodes, and we have some content created in the editor itself where the starting node is a list item, if the content is copied from the editor and pasted back into the same editor, the first list item is not preserved. The first node becomes a paragraph instead, and any sub-lists of the first node become lists at the level of the first node, thus incorrectly changing the hierarchy of the nested list.
Browser Used
Issue is visible in all browsers.
Code Example URL
https://codesandbox.io/p/sandbox/keen-wave-7xykrl
Expected Behavior
When both paragraph and list nodes are declared as defining, it should preserve the first list node while pasting back the content into the editor instead of transforming it into a paragraph node. The nested lists should also maintain their original hierarchy.
Additional Context (Optional)
Adding an GIF of the same:
Dependency Updates
The text was updated successfully, but these errors were encountered: