Issue #1891💬 AnsweredOpened March 14, 2019by jwilson-lyonscg0 reactions

Can't create new button component

Quick answerby jwilson-lyonscg

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)

jwilson-lyonscgMarch 14, 2019

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...

artfMarch 22, 2019

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...

lock[bot]March 21, 2020

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.