Skip to content
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

Retain existing config when calling configure on Marks and Extensions (attempt 2) #3998

Closed
wants to merge 1 commit into from

Conversation

nholden
Copy link
Contributor

@nholden nholden commented Apr 30, 2023

This is a second attempt at addressing #3813. My first attempt, #3822, had to be reverted because of issues described in this comment. That comment described a defaultOptions warning that I was able to reproduce in my original approach, and I confirmed it's no longer present in this approach. cc @bdbch

Currently, when you call .configure() on a Mark or Extension, the Mark or Extension that's returned doesn't retain the config from the original.

This is a problem for StarterKit. When Code is added to an editor added as a standalone extension, an inline code block is exitable. When added as part of StarterKit, an inline code block is not exitable because StarterKit calls Code.configure(), blowing away the default config.

This PR ensures that when you call .configure() on a Mark or Extension, the Mark or Extension that's returned retains the config from the original.

closes #3813

@netlify
Copy link

netlify bot commented Apr 30, 2023

Deploy Preview for tiptap-embed ready!

Name Link
🔨 Latest commit 5703ed2
🔍 Latest deploy log https://app.netlify.com/sites/tiptap-embed/deploys/644e8588ef79170008441a36
😎 Deploy Preview https://deploy-preview-3998--tiptap-embed.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@bdbch
Copy link
Contributor

bdbch commented Aug 16, 2023

Hey @nholden - sorry for not reviewing this PR earlier. This looks promising – at least I didn't encounter the issues we experienced with the first draft. Do you mind we merge this and bring it into 2.2.0-rc.1 first so we can test it out with more people?

@svenadlung svenadlung requested a review from bdbch August 16, 2023 18:35
@nholden
Copy link
Contributor Author

nholden commented Aug 16, 2023

Sounds great. Thanks, @bdbch!

@Sembauke
Copy link

can we merge this?

@nperez0111
Copy link
Contributor

This has already been resolved by #4191

@nperez0111 nperez0111 closed this May 14, 2024
@nholden nholden deleted the nholden/retain-config-2 branch May 14, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code not exitable in StarterKit
5 participants