grapesjs icon indicating copy to clipboard operation
grapesjs copied to clipboard

BUG: Custom Blocks are wrapped into a div

Open BerkeAras opened this issue 6 years ago • 2 comments

Version: 0.16.18

Are you able to reproduce the bug from the demo?

[X] Yes: https://codesandbox.io/s/empty-night-8q733?file=/index.js [ ] No

What is the expected behavior? The Element "Link Button" should not be in a div. There should not be a div, just a 'a' tag

What is the current behavior?

Custom blocks are wrapped into a div.

Are you able to attach screenshots, screencasts or a live demo?

[X] Yes https://codesandbox.io/s/empty-night-8q733?file=/index.js [ ] No

BerkeAras avatar Jul 26 '20 07:07 BerkeAras

Hi @BerkeAras !

As shown on the Getting Started page, you can specify a tagName property when defining custom Blocks & Components to override the default div tag.

Cheers !

mcottret avatar Jul 27 '20 14:07 mcottret

You're passing a description for a component (<div> as default) and then adding inner content (<a> tag) to that component

artf avatar Jul 29 '20 12:07 artf