Skip to content
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

Custom NodeView for mark behaves differently than node NodeView #1082

Open
torifat opened this issue Jul 28, 2020 · 1 comment
Open

Custom NodeView for mark behaves differently than node NodeView #1082

torifat opened this issue Jul 28, 2020 · 1 comment

Comments

@torifat
Copy link
Contributor

torifat commented Jul 28, 2020

When we use NodeView for a node. It allows us to handle destory, stopEvent, ignoreMutation, etc.

It keeps the custom spec we provide in CustomNodeViewDesc.
https://github.com/ProseMirror/prosemirror-view/blob/bd29b934ab235570d8f40c0df5941d5bdbbbc424/src/viewdesc.js#L821

But, in case of mark, it creates just a vanilla MarkViewDesc.
https://github.com/ProseMirror/prosemirror-view/blob/bd29b934ab235570d8f40c0df5941d5bdbbbc424/src/viewdesc.js#L522

And, we can't use any of those lifecycle hooks.

Does it make sense to allow same things for marks? I'm happy to contribute this change if you think this something that makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants