How to avoid extra wrapper when using ReactNodeViewRenderer #5536
Unanswered
thiagoterleski
asked this question in
Questions & Help
Replies: 1 comment
-
Been fighting this little Quite often how we've approach it is that we'd apply the grid style further down. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the context of extensions using react components to render elements, where the goal is to compose blocks following a template structure, I created all the extensions and set the correct rules for the
content
type.The issue is that I can't properly compose the layouts because tiptap is creating "extra" wrappers for each block, specifically the
<div style="white-space: inherit;">
.This is problematic since my extension blocks rely on parent components to set the grid layouts for example.
Basically the structure I am trying to create is something like:
In this scenario, productOverviewComparasion contains a
Grid
component responsible for rendering the child elements. Since this extension has an extra wrapper, the styling won't work properly.We have other situations similar to this one, where we need to create specific template blocks but allow users to edit parts of them.
Even for the wrapper elements, I find it difficult to replace them with custom components; for example, we are using
grommet
for UI elements, and it seems that I can fix this by using<NodeViewContainer as={Box}>
for example.Has anyone come up with the same challenges?
Beta Was this translation helpful? Give feedback.
All reactions