Markdown tables break when wrapped in block-level HTML elements in Tiptap #7541
Unanswered
nareshreddymandati9177-stack
asked this question in
Questions & Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Issue: Clarification & Stability of Markdown Tables When Mixed With HTML in Tiptap
We are encountering inconsistent behavior and table breakage in Tiptap when Markdown tables are mixed with block-level HTML elements during Markdown ↔ HTML conversions. This issue is primarily related to how tables are parsed and rendered when wrapped inside block elements such as
<div>or<p>, or when block elements appear inside table cells.Markdown tables render correctly when authored as pure Markdown at the root level. However, once HTML block elements are introduced—either wrapping the table or embedded within table cells—the table structure often breaks, flattens into text, or renders inconsistently inside the editor.
This is a significant concern for our application, as tables are a core content structure. We rely heavily on deterministic Markdown ↔ HTML round-tripping for programmatic content insertion, storage, and rehydration inside Tiptap. When tables break, it leads to UI issues and potential data loss, making it difficult to define a safe, long-term content schema.
Expected behavior
Markdown tables should either:
Additionally, supported and unsupported table structures should be clearly defined so developers can author content safely.
Actual behavior observed
<div>or<p>frequently render as plain textBelow are representative examples demonstrating working and breaking scenarios.
Example 1 – Works (Plain Markdown table)
Beta Was this translation helpful? Give feedback.
All reactions