BUG: Custom Blocks are wrapped into a div
Question
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
Answers (2)
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 !
You're passing a description for a component (<div> as default) and then adding inner content (<a> tag) to that component
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3681
BUG: Textable not working with extended text component
Version: 0.17.22 Are you able to reproduce the bug from the demo?[X] Yes[ ] No What is the expected behavior? Should be able to drop a text...
Issue #3939
BUG: Disabled drag and drop in preview
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? v95Reproducible demo link https://codesandbo...
Issue #3291
BUG (v0.16.41): the duplicate icon from the icon toolbar is modifying the original element too
Version: v0.16.41 Are you able to reproduce the bug from the demo? [ ] Yes What is the expected behavior? The elements duplicated not shoul...
Issue #3295
BUG (v0.16.41): Button component with draggable property is not working properly
Version: v0.16.41 Are you able to reproduce the bug from the demo? [ ] Yes [ ] No What is the expected behavior? When we have a button with...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.