You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When defining a schema that prevents list nesting by forcing a single paragraph in list item, wrapInList doesn't work anymore when multiple nodes of text are selected.
Notice that "Wrap in bullet list" and "Wrap in ordered list" aren't available
Setting list content to "paragraph*" (zero or more paragraphs) or "paragraph+" (one or more paragraphs) instead of "paragraph" (one paragraph) will make this work.
Maybe I don't know ProseMirror too well, but I would expect that multiple lines of text could be wrapped into a list if list item content is forced to have a single paragraph.
Additional info
I did poke around a bit and found that findWrapping() inside wrapInList() returns null. Don't have more findings about this since I'm not 100% sure what's going on.
P.S. Thanks for all your amazing work!
The text was updated successfully, but these errors were encountered:
What would work in this case would be to first wrap the first block and then move the items after that into the list one by one. You could try to write a command that works like that, or submit a pull request that updates the implementation in prosemirror-schema-list
Thank you for this quick answer. Sorry I opened an issue when there is this forum post, but I didn't manage to find it while searching for similar issues.
What would work in this case would be to first wrap the first block and then move the items after that into the list one by one. You could try to write a command that works like that, or submit a pull request that updates the implementation in prosemirror-schema-list
Thanks for the suggestion, I'll see what I can do. I'll try to go for a PR, but ProseMirror can be intimidating so I'm not sure if I'll be able to tackle it 😄
Issue details
When defining a schema that prevents list nesting by forcing a single paragraph in list item,
wrapInList
doesn't work anymore when multiple nodes of text are selected.Steps to reproduce
https://codesandbox.io/s/blue-haze-pbtei?file=/src/index.js
Setting list content to "paragraph*" (zero or more paragraphs) or "paragraph+" (one or more paragraphs) instead of "paragraph" (one paragraph) will make this work.
ProseMirror version
prosemirror-example-setup - 1.1.2
prosemirror-model - 1.14.3
prosemirror-schema-basic - 1.1.2
prosemirror-schema-list - 1.1.5
prosemirror-state - 1.3.4
prosemirror-view - 1.20.1
Affected platforms
All tested on Windows 10 21H1:
Screenshots / Screencast (Optional)
WpZsBDKftI.mp4
Expected behavior
Maybe I don't know ProseMirror too well, but I would expect that multiple lines of text could be wrapped into a list if list item content is forced to have a single paragraph.
Additional info
I did poke around a bit and found that
findWrapping()
insidewrapInList()
returns null. Don't have more findings about this since I'm not 100% sure what's going on.P.S. Thanks for all your amazing work!
The text was updated successfully, but these errors were encountered: