We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When we use NodeView for a node. It allows us to handle destory, stopEvent, ignoreMutation, etc.
NodeView
node
destory
stopEvent
ignoreMutation
It keeps the custom spec we provide in CustomNodeViewDesc. https://github.com/ProseMirror/prosemirror-view/blob/bd29b934ab235570d8f40c0df5941d5bdbbbc424/src/viewdesc.js#L821
CustomNodeViewDesc
But, in case of mark, it creates just a vanilla MarkViewDesc. https://github.com/ProseMirror/prosemirror-view/blob/bd29b934ab235570d8f40c0df5941d5bdbbbc424/src/viewdesc.js#L522
mark
MarkViewDesc
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.
The text was updated successfully, but these errors were encountered:
I'd like to see more support for this but there is some discussion on this already by @marijnh
https://discuss.prosemirror.net/t/unfurling-links/1191/3?u=bzichett
https://discuss.prosemirror.net/t/mark-with-a-custom-node-view-that-defines-its-own-content/860/2?u=bzichett
https://discuss.prosemirror.net/t/can-a-markview-know-when-selection-is-inside-their-node/1956/8?u=bzichett
Sorry, something went wrong.
No branches or pull requests
When we use
NodeView
for anode
. It allows us to handledestory
,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 vanillaMarkViewDesc
.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.
The text was updated successfully, but these errors were encountered: