-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
make NodeType.groups public #1489
Comments
What is the use case where you need to enumerate the groups a node is part of? The general idea behind groups is that they allow you query whether a node is part of a given group with |
That'd be my use-case indeed. Which |
|
I think you're referring to the lezer docs. As far as I see from browsing Prosemirror source code / types / docs it's not available in prosemirror? |
Wow, indeed, I was somewhere else entirely—wrong Would an |
Ha I thought I was going crazy! Yes your suggestion would be perfect 👍 |
Done in attached patch. |
I noticed NodeType.groups is marked as
internal
: https://github.com/ProseMirror/prosemirror-model/blob/a57531574336d00df43a68e3a2f69582b426033e/src/schema.ts#L62.I think it can be quite useful for consumers in case nodes are part of multiple groups. Makes sense to expose it so that types are properly exported? Or is there a specific reason it's marked as internal?
The text was updated successfully, but these errors were encountered: