[Bug]: Non-empty array for content breaks editor #5198
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
pm, react, starter-kit, extension-underline
Version(s)
2.4.0
Bug Description
The bug is the same as #3773:
It was supposed to be fixed by #3786, however, the fix only works for empty arrays and Tiptap still fails for non-empty ones.
For example, using this as content succeeds:
but this fails:
Given that the error is:
I guess it happens because, in case of arrays,
createNodeForContent
returns aFragment
, butFragment
has notype
whileNode
does.Browser Used
Chrome
Code Example URL
No response
Expected Behavior
The editor should load and display the
JSONContent[]
as its content.Additional Context (Optional)
No response
Dependency Updates
The text was updated successfully, but these errors were encountered: