-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix: apply #5147 fix to marks and nodes #5156
Conversation
✅ Deploy Preview for tiptap-embed ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
// addProseMirrorPlugins() { | ||
// console.log('custom', this, this.parent) | ||
// return [ | ||
// ...this.parent(), | ||
// ] | ||
// }, | ||
}) | ||
.configure({ lowlight }), | ||
.configure({ lowlight }) | ||
.extend({ | ||
addProseMirrorPlugins() { | ||
return [ | ||
...this.parent(), | ||
] | ||
}, | ||
}), |
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 will need to add more tests for this. Just wanted it out of my mind
packages/core/src/Extension.ts
Outdated
const extension = this.extend({ | ||
addOptions() { | ||
return mergeDeep(this.parent?.() || {}, options) as Options | ||
}, | ||
}) |
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.
This is the secret sauce, a configure is just a short way of expressing additional options to be applied
8829712
to
1bec3d9
Compare
62e5c1f
to
daa3c66
Compare
a7e02b3
to
dee3946
Compare
Changes Overview
As a follow up to #5147
In my previous PR, @634750802 reminded me that Nodes & Marks both have the configure method as well and have almost the exact same logic as extensions. So I applied the change to Nodes & Marks as well
Implementation Approach
See $5147
Testing Done
Ran all tests, everything looks good
Verification Steps
See above
Additional Notes
Checklist
feat: Implement new feature
orchore(deps): Update dependencies
)Related Issues