Problem statement
Settings → Import & export → Replace with a file turns Markdown into Tiptap JSON, then applies it with setContent.
A provider URL or a file path in that Markdown becomes a link. It does not become a video, audio, youtube, vimeo, loom, soundcloud, spotify, or x node.
The live local /demo page holds those nodes. PROPOSAL-demo/DEMO.md names the same files and URLs, so a Markdown replace drops the players even when the words match.
Sister ticket: #151 (picture width and height). Same import path, different gap.
Proposed solution
A Markdown replace that includes these lines should leave playable media in the document, not only links:
/demo-assets/demo-video.mp4 and /demo-assets/demo-audio.mp3 as uploaded video / audio nodes
- The six provider URLs already in
DEMO.md as the matching embed nodes (YouTube, Vimeo, Loom, SoundCloud, Spotify, X)
How we recognise a URL as a player is an implementation choice. The existing paste-to-embed rules in the editor are the behaviour to match. Do not invent a second URL classifier.
Alternatives considered
- Leave
DEMO.md as links and write Tiptap JSON through PATCH /content when the page must show players. Works today. Does not help Settings → Replace.
- Ask the reader to paste each URL after import. Works. Does not scale.
Impact
Anyone who replaces a document from .md and expects a pasted media URL to play in place. The demo page is the first document that needs this.
Acceptance criteria
Blocked by
None — can start immediately. Related to #151; they can land in either order.
Additional context
- Repro file:
PROPOSAL-demo/DEMO.md (Video and audio, Embeds).
- Apply path: Settings replace → conversion JSON →
setContent.
- Markdown import shares the export manager and does not run the editor paste rules.
Checklist
Problem statement
Settings → Import & export → Replace with a file turns Markdown into Tiptap JSON, then applies it with
setContent.A provider URL or a file path in that Markdown becomes a link. It does not become a
video,audio,youtube,vimeo,loom,soundcloud,spotify, orxnode.The live local
/demopage holds those nodes.PROPOSAL-demo/DEMO.mdnames the same files and URLs, so a Markdown replace drops the players even when the words match.Sister ticket: #151 (picture width and height). Same import path, different gap.
Proposed solution
A Markdown replace that includes these lines should leave playable media in the document, not only links:
/demo-assets/demo-video.mp4and/demo-assets/demo-audio.mp3as uploadedvideo/audionodesDEMO.mdas the matching embed nodes (YouTube, Vimeo, Loom, SoundCloud, Spotify, X)How we recognise a URL as a player is an implementation choice. The existing paste-to-embed rules in the editor are the behaviour to match. Do not invent a second URL classifier.
Alternatives considered
DEMO.mdas links and write Tiptap JSON throughPATCH /contentwhen the page must show players. Works today. Does not help Settings → Replace.Impact
Anyone who replaces a document from
.mdand expects a pasted media URL to play in place. The demo page is the first document that needs this.Acceptance criteria
PROPOSAL-demo/DEMO.mdthrough Settings → Replace leaves a playable video and a playable audio where those files are named.altand the italic line under a picture still survive (do not regress [Feature]: Markdown import should keep image width and height #151).Blocked by
None — can start immediately. Related to #151; they can land in either order.
Additional context
PROPOSAL-demo/DEMO.md(Video and audio, Embeds).setContent.Checklist