Darginec05 / Yoopta-Editor

Build Notion-like, Craft-like, Coda-like, Medium-like editors with Yoopta
https://yoopta.dev/
MIT License
1.07k stars 82 forks source link

[BUG] embed iframe should have a close tag </iframe> while exporting HTML #207

Closed j7-dev closed 1 month ago

j7-dev commented 1 month ago

Has this bug been raised before?

Description

Currently, embed will export a self-close <iframe /> tag while exporting HTML which might cause a unexpected result.

And that break my DOM structure, adding a close iframe can fix the problem.

Steps to Reproduce

  1. Embed a youtube
  2. type some word after iframe
  3. copy the exporting HTML
  4. paste to HTML

圖片

Environment

Screenshots

圖片 圖片 圖片

Do you want to work on this issue?

Yes

If "yes" to above, please explain how you would technically implement this

  1. add close tag
  2. check the deserialize works as usaul

圖片

Darginec05 commented 1 month ago

Hey @j7-dev , thanks for reporting! Are you working on this task now?

j7-dev commented 1 month ago

Yes, I've made a simple change to this. Should I send a PR to you? @Darginec05

Darginec05 commented 1 month ago

@j7-dev sure! I'll check it and then merge for next patch release

Darginec05 commented 1 month ago

Thanks for you investigation. It was fixed in v4.6.5 Examples: https://yoopta.dev/examples/withBaseFullSetup