Skip to content
Discussion options

You must be logged in to vote

Hey @dsipetcher,

Thanks for reaching out and providing the detailed code snippets!

It sounds like you're correctly adding an id to your node data before it potentially gets to Tiptap (or intending for it to be there), but when you try to access it later via node.attrs.id after inspecting the editor state (state.doc.descendants), it comes back as null. You also noted that standard attributes like textAlign work as expected.

The most probable reason for this behavior is that Tiptap's schema isn't aware of your custom id attribute.

Tiptap relies fundamentally on its schema, which is built from all the extensions you provide (Paragraph, Heading, Bold, your CustomParagraph, etc.). Each extensi…

Replies: 1 comment 14 replies

Comment options

You must be logged in to vote
14 replies
@dsipetcher
Comment options

@arnaugomez
Comment options

@dsipetcher
Comment options

@arnaugomez
Comment options

Answer selected by dsipetcher
@dsipetcher
Comment options

@arnaugomez
Comment options

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