Skip to content

fix(mdxished): Preserve embed type and dimensions when copy/pasting <Embed> blocks#1369

Merged
Jadenzzz merged 1 commit intonextfrom
jayden/rm-15490-pasting-any-embed-into-editor-will-insert-it-as-an-iframe-new
Mar 10, 2026
Merged

fix(mdxished): Preserve embed type and dimensions when copy/pasting <Embed> blocks#1369
Jadenzzz merged 1 commit intonextfrom
jayden/rm-15490-pasting-any-embed-into-editor-will-insert-it-as-an-iframe-new

Conversation

@Jadenzzz
Copy link
Copy Markdown
Contributor

@Jadenzzz Jadenzzz commented Mar 6, 2026

PR App Fix RM-XYZ

🧰 Changes

Issue

When users copy/paste an embed block like , the typeOfEmbed attribute was being dropped during the JSX-to-MDAST transformation. This caused all pasted embeds to default to iframe type regardless of their original type

Root cause

The transformEmbed function in mdxish-jsx-to-mdast.ts had typeOfEmbed defined in its EmbedAttrs interface but never extracted or included it in hProperties. Similarly, height and width attributes were not handled.

Fix

  • Added height and width to EmbedAttrs interface
  • Updated transformEmbed to extract typeOfEmbed, height, and width from JSX attributes
  • Added these properties to hProperties output

🧬 QA & Testing

@Jadenzzz Jadenzzz marked this pull request as ready for review March 6, 2026 05:30
Copy link
Copy Markdown
Contributor

@eaglethrost eaglethrost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks lgtm!

@Jadenzzz Jadenzzz merged commit 5af9623 into next Mar 10, 2026
14 of 15 checks passed
@Jadenzzz Jadenzzz deleted the jayden/rm-15490-pasting-any-embed-into-editor-will-insert-it-as-an-iframe-new branch March 10, 2026 00:32
rafegoldberg pushed a commit that referenced this pull request Mar 16, 2026
## Version 13.6.0
### ✨ New & Improved

* correctly render block level elements in callout ([#1362](#1362)) ([32040cb](32040cb))

### 🛠 Fixes & Updates

* **mdxish-editor:** built in anchor component not deserializing to to a link in mdxish editor ([#1361](#1361)) ([30e037d](30e037d))
* **mdxish:** callout end tag rendering ([#1373](#1373)) ([cad7594](cad7594))
* **mdxish:** combine code tabs if separated by CLRF token \r\n ([#1372](#1372)) ([2d8d267](2d8d267))
* **mdxish:** Curly braces on separate lines cause render failure on MDXish ([#1364](#1364)) ([d85e106](d85e106))
* **mdxished:** Preserve embed type and dimensions when copy/pasting <Embed> blocks ([#1369](#1369)) ([5af9623](5af9623))

### 📘 Tests & Docs

* **xish:** add CLAUDE.md + processor flow overview docs ([#1370](#1370)) ([b8d9e4c](b8d9e4c))

<!--SKIP CI-->
@rafegoldberg
Copy link
Copy Markdown
Contributor

This PR was released!

🚀 Changes included in v13.6.0

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants