Open XiaodongTong opened 1 year ago
I meet similar sitituation in my custom prosemirror's schema.I'm not sure about when to use mark / attrs for a node.
But in file y-prosemirror/src/lib.js, yXmlFragmentToProsemirrorJSON this function processes only text nodes' marks, and attrs only for non-text nodes.
If marks are designed just for text node, and atts for non-text nodes, y-prosemirror will should not support marks for non-text nodes, as that will be anti prosemirror's design.
It's a pleasure for any suggestion or guidance on how to use marks/attrs correctly, fellows the design.
I meet similar sitituation in my custom prosemirror's schema.I'm not sure about when to use mark / attrs for a node.
But in file y-prosemirror/src/lib.js, yXmlFragmentToProsemirrorJSON this function processes only text nodes' marks, and attrs only for non-text nodes.
If marks are designed just for text node, and atts for non-text nodes, y-prosemirror will should not support marks for non-text nodes, as that will be anti prosemirror's design.
It's a pleasure for any suggestion or guidance on how to use marks/attrs correctly, fellows the design.
I have also need to handle this case
In my understanding,marks act as a way to add attrs to prosemirror document , not only text node.
In tiptap and Confluence Editor , also use mark to effect non-text node
Looking good, very useful feature for format compatibility & avoiding data loss.
@XiaodongTong - any plans to fix the final requested change and add tests?
@dmonad are there any plans to merge this? I also face the very same issue and wanted to raise a PR. Then I noticed this one here. I can also complete this work if you like
What's actuality pending here? I'd like to contribute to get this thing through
fix https://github.com/yjs/y-prosemirror/issues/47
Using『node mark』 as an attribute on YElement,Each mark corresponds to an YElement attribute.
Runable in my project.
Hope to merge