Create(extend) custom mjml component #5366
Replies: 2 comments 4 replies
-
@artf Hi editor.getSelected().append(` <mj-wrapper data-gjs-type="custom-wrapper">
<mj-section>
<mj-column>
<mj-image src="/vite.svg" />
</mj-column>
</mj-section>
</mj-wrapper> `) it'll work |
Beta Was this translation helpful? Give feedback.
-
Here is another demo: https://codesandbox.io/s/hungry-kapitsa-l6ms6x?file=/src/App.js I'm creating a new section component where I need to define custom attributes for all the sections, but drag and drop becomes impossible |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi.
I am new at Grapes, and I'm trying to define a new custom component that will extend the existing one and create a new block for it to be easily drag-droppable.
Block
But I can't drag and drop this component inside the canvas; there is an error saying
I've seen in other issues people suggesting using only blocks for defining your 'elements', but I need to attach custom behavior to sections and wrappers ... and preserve original ones as well.
Beta Was this translation helpful? Give feedback.
All reactions