Creating new container component type: Add placeholder, default size, and automatically resize to inner components #4528
-
I'm trying to create a new The
Screen.Recording.2022-08-24.at.16.44.54-1.movNote: you can see the console logs in my code below - both are null when the app is first run, and if I don't have another if statement to check for (doc) it causes an Uncaught TypeError. It makes sense that
Here's what I've done so far:
Hopefully this makes sense, but let me know if you need any more information. Thanks in advance for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I've managed to implement most of the above by copying and editing the code from grapesjs-blocks-basic as follows:
Most of the questions in the original post can therefore be disregarded, which you'll be happy about @artf. The only problem with this is that I want the Here's a video showing the current behaviour: Screen.Recording.2022-08-29.at.15.53.40-1.movLet me know if you need any further information, thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
Fixed it! The reason is that the tagName property inside defaults is |
Beta Was this translation helpful? Give feedback.
Fixed it! The reason is that the tagName property inside defaults is
foreach
and therefore the default stylings (blue border etc.) aren't being applied - if I change this todiv
it works.