@platejs/markdown@53.0.0

udecode/plate@platejs/markdown@53.0.0Apr 23, 2026by github-actions[bot]

AI Summary

Major overhaul of markdown serialization logic for blockquotes, images, MDX attributes, and footnotes to support richer data structures and round-tripping.

Key Highlights

  • Round-trip blockquotes as nested block content (paragraphs/lists) instead of flat text
  • Serialize image titles from node.title instead of caption
  • Preserve MDX media attribute expressions (e.g., width={640}) instead of stringifying to JSON
  • Serialize plain URLs as bare URLs instead of bracket-link form
  • Round-trip footnote references and definitions as dedicated nodes

Breaking Changes

  • Blockquote structure changed from flat text to nested block children
  • Image serialization now requires node.title for markdown output like ![alt](url "title")
  • Plain URLs now serialize as bare URLs instead of bracketed links
  • Footnote nodes require @platejs/footnote plugins to function properly

Full Release Notes

### Major Changes

-   [#4941](https://github.com/udecode/plate/pull/4941) by [@zbeyens](https://github.com/zbeyens) – Round-trip blockquotes as nested block content instead of flat newline-packed text.
    Serialize image titles from `node.title` instead of copying the caption into the markdown title slot.
    Preserve MDX media attribute expressions during markdown serialization instead of stringifying them into JSON text.
    Serialize plain URL links back to bare URL markdown instead of bracket-link form.
    Round-trip footnote references and definitions as dedicated footnote nodes instead of collapsing them to plain-text fallback.

    **Migration:**

    1.  Update snapshots and direct value assertions to expect `blockquote.children` to contain block nodes such as paragraphs and lists.
    2.  If you generate initial editor values from markdown, hydrate blockquotes with paragraph children instead of flat text.
    3.  If you want markdown output like `![alt](url "title")`, set `node.title`. Images without a title now serialize as `![alt](url)`.
    4.  If you serialize MDX media nodes with expression attributes like `width={640}`, expect those expressions to stay as expressions instead of turning into quoted JSON.
    5.  Plain URL links such as `https://platejs.org` now serialize as bare URLs instead of `[https://platejs.org](https://platejs.org)`.
    6.  If you enable footnote-aware markdown input, install `@platejs/footnote` and include `BaseFootnoteReferencePlugin` and `BaseFootnoteDefinitionPlugin` so footnote nodes have real editor semantics instead of falling back to unknown node types.

    ```tsx
    // Before
    { type: 'blockquote', children: [{ text: 'Quote\\nNext line' }] }

    // After
    {
      type: 'blockquote',
      children: [
        { type: 'p', children: [{ text: 'Quote' }] },
        { type: 'p', children: [{ text: 'Next line' }] },
      ],
    }
    ```

### Patch Changes

-   [#4941](https://github.com/udecode/plate/pull/4941) by [@zbeyens](https://github.com/zbeyens) – Write canonical date nodes as `<date value="..."/>` and round-trip normalized media embed metadata

-   [#4941](https://github.com/udecode/plate/pull/4941) by [@zbeyens](https://github.com/zbeyens) – Preserve unknown MDX and raw HTML block source more faithfully during markdown deserialization fallback