Skip to content

Fix round-trip serialisation by explicitly rendering id and data-id attributes - #27

Open
kiusau wants to merge 1 commit into
buttondown:mainfrom
kiusau:main
Open

Fix round-trip serialisation by explicitly rendering id and data-id attributes#27
kiusau wants to merge 1 commit into
buttondown:mainfrom
kiusau:main

Conversation

@kiusau

@kiusau kiusau commented May 17, 2026

Copy link
Copy Markdown

Fixes #6

The Footnote node's addAttributes() method did not include explicit
renderHTML functions for the id and data-id attributes. Without these,
TipTap does not guarantee these attributes appear in the serialised HTML output,
causing the parseHTML rule to fail on round-trip since it requires data-id
to identify footnote nodes.

This fix adds explicit renderHTML functions to both attributes, ensuring they
are always present in the serialised HTML.

@jmduke

jmduke commented May 18, 2026

Copy link
Copy Markdown
Member

cc @mary-ext

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Loading text with footnotes

2 participants