Can't create new button component
Okay so after some more experimentation it appears my component structure is correct, but my button block was not working correctly. So the button block was like this: When dragging this block into the canvas, this did not get recognized as a button component. However when I changed it to this: Then it works fine. Is...
Read full answer below ↓Question
I'm having a hard time creating a new component for a <button> element. What am I missing? Is something bugged out here? Works fine if I change it to an <input> element:
Answers (3)
Okay so after some more experimentation it appears my component structure is correct, but my button block was not working correctly. So the button block was like this: When dragging this block into the canvas, this did not get recognized as a button component. However when I changed it to this: The...
I think the problem here is a misunderstanding of content key. When you declare a block The content is for the Component, like a string o like an object. The string version of the example above would be: But when you use content inside a Component, it indicates the use of static content (eg. like t...
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1959
[Question] Edit innerHTML in a custom button
Hi All, I am trying to change the text in a button component, but I am not able to edit it. I added this type: I included the editable: tru...
Issue #709
isComponent is not returning trait
Happy new year! I am having an issue with isComponent(). Here is my code: For some reason the only time the trait shows up in component set...
Issue #845
Impossible to select Iframe
I've created a new type of component an general iframe, avoiding selecting the map, but when I try to select it in canvas so that the setti...
Issue #484
Can I restrict what blocks that can be dropped into a container
My intent is to create a block that should allow only image components (I'm using the default one from grapes-blocks-basic) to be dropped i...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Related tutorials
In-depth guides on the same topic.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.