-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolves #4089 #5515
Resolves #4089 #5515
Conversation
🦋 Changeset detectedLatest commit: d9f14a3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 55 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
❌ Deploy Preview for tiptap-embed failed. Why did it fail? →
|
|
||
it('can convert from & to html', async () => { | ||
const extensions = [Document, Text, Youtube] | ||
const html = `<p>Tiptap now supports YouTube embeds! Awesome!</p> | ||
<div data-youtube-video> | ||
<iframe src="https://www.youtube.com/watch?v=cqHqLQgVCgY"></iframe> | ||
</div>` | ||
const json = generateJSON(html, extensions) | ||
|
||
expect(generateHTML(json, extensions)).to.equal(html) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish we had more tests to give more confidence here 😓
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we get an update here? @haydenbleasel (the branch also needs to get synced with upstream again)
I couldn't pull this down locally to test it, so I made my changes to get this ready for V3 in this PR, closing here since that will be the one we ultimately merge. Very much appreciate the contribution though @haydenbleasel |
Changes Overview
Replaces
zeed-dom
withhappy-dom
, allowing for parsing of more complex HTML structures.Implementation Approach
Replaced
zeed-dom
withhappy-dom
ingenerateJSON
andgetHTMLFromFragment
as proposed by @Philipinho.Testing Done
it("can convert from & to html")
as proposed by @ben-bourdin451, though haven't validated it yet due to 'Cypress could not verify that this server is running' error with baseUrl in component test after updating to v13 cypress-io/cypress#27990Verification Steps
None
Additional Notes
None
Checklist
Related Issues
#4089 (comment)
#5352