-
-
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
feature: allow to customize the tag of the contentDOMElement #3984
Conversation
✅ Deploy Preview for tiptap-embed ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Running into this issue too. In the PR I see that preventContentDOMElement is not there anymore. I'd love to be able to remove it. |
@sradu sorry, forgot to fix the description. I now did. History: Initially we wanted to have |
Circling back here. The issue is that if the parent element is a grid, and the child nodes are columns, this still breaks. |
@sradu oh now do you have an example? or even better a solution how to solve both cases? would love to see some way to fix the issue |
@nikgraf my very broken fix is:
What is the purpose of that extra div though? Why is it needed? |
@sradu interesting trick, need to give it a try. Initially we tried to remove the div, but realized this is a larger change since plenty of other places reference the div. So this was the lowest impact change to achieve the goal. I hoped this would make it easier to get it merged. |
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.
LGTM. I'll add docs for this as I'm at it.
@svenadlung you also want to take another look? |
awesome thanks 🙌 |
I'll include this for 2.2.0-rc.0 |
Please describe your changes
Added the option
contentDOMElementTag
to theNodeViewRendererOptions
to allow users to provide as the desired element tag they would like to render.This allows developers to solve the issue with injected divs inside a
table
when extending the table extension:How did you accomplish your changes
Added the option
contentDOMElementTag
How have you tested your changes
In
demos/src/GuideNodeViews/ReactComponentContent/React/Extension.js
we tested it using:You can see it in action here where we applied the patch via patch-packages: https://github.com/serenity-kit/Serenity/blob/68d7bb29979abf9833116c81f2db27156724a93d/packages/editor/extensions/tableExtension/tableExtension.ts#L15
How can we verify your changes
Reproduce the test?
Checklist
Related issues