Open ascott18 opened 3 years ago
If anyone wants to tackle this in a PR, two main functions to address are createTypeFromElementNode
and createNodeFromYElement
.
Particularly, serialize the marks of a node as Y.XmlElement
attributes using setAttribute
while differentiating them somehow from node.attrs
, then deserializing them and passing Mark[]
as argument to schema.node
.
The lack of support for marks on custom nodes is currently causing issues in an editor that I'm building. Would love to see this feature.
Judging from the title, #63 sounds like it should resolve the issue. Is there something preventing us from taking #63 in @dmonad? I would love to help if I can.
Same here, this has become a blocker on one of my projects as well. Can #63 be merged?
Any updates on this @dmonad?
Any updates, please? @dmonad
The same problem, custom nodes cannot support marks
Same problem here, any updates?
+1
Checklist
Describe the bug
This plugin fundamentally does not support marks on nodes that are not text nodes. For example, Tiptap's image node, which is an inline, non-text node: https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/nodes/Image.js.
To Reproduce
<a></a>
wrapping the image node.Expected behavior
Marks on custom nodes are handled just as attributes on custom nodes are handled.