fix: configure Image extension as block-level to match Docmost's schema #5

Closed
foogunlana wants to merge 1 commits from foogunlana/fix/image-inline-config into main
foogunlana commented 2026-03-11 03:12:08 -06:00 (Migrated from github.com)

Summary

Fixes #4update_page silently drops all images from page content.

Bug

When updating a page via the update_page tool, all <img> nodes are silently stripped from the content. The resulting page saves successfully but with every image removed.

Root Cause

In src/lib/tiptap-extensions.ts, the TipTap Image extension is configured with inline: true. However, Docmost's editor uses inline: false, group: "block" for its Image extension. When the MCP server merges content into the Yjs document, the schema mismatch causes inline image nodes to be discarded during the Yjs merge — they don't match the expected block-level image node type.

Fix

One-line change: set inline: false in the Image extension configuration so it matches Docmost's schema.

🤖 Generated with Claude Code

## Summary Fixes #4 — `update_page` silently drops all images from page content. ## Bug When updating a page via the `update_page` tool, all `<img>` nodes are silently stripped from the content. The resulting page saves successfully but with every image removed. ## Root Cause In `src/lib/tiptap-extensions.ts`, the TipTap `Image` extension is configured with `inline: true`. However, Docmost's editor uses `inline: false, group: "block"` for its Image extension. When the MCP server merges content into the Yjs document, the schema mismatch causes inline image nodes to be discarded during the Yjs merge — they don't match the expected block-level image node type. ## Fix One-line change: set `inline: false` in the Image extension configuration so it matches Docmost's schema. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
aleleba closed this pull request 2026-05-30 20:31:40 -06:00

Pull request closed

Sign in to join this conversation.