Skip to content

Does not support marks on non-TextNodes #47

@ascott18

Description

@ascott18

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

  1. Apply a mark to an inline node. For example, apply a hyperlink (https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/marks/Link.js) to an image (https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/nodes/Image.js)
  2. Be the editor of the document. Observe that the JSON version of the prosemirror doc does contain the expected mark, and that the HTML is rendered with the correct <a></a> wrapping the image node.
  3. Be a realtime collaborator on the same document, OR reload the document using the serialized ydoc. Observe that the hyperlink on the image is missing because the mark is not serialized into the ydoc.

Expected behavior

Marks on custom nodes are handled just as attributes on custom nodes are handled.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions