Set a button from Component settings active on click
Question
So i made a custom countdown with a button
The button set the countdown but i want to make the button active like other elements on click.
my code:

Answers (2)
@artf please help
Unfortunately, the default button type is made to execute only one command, so if you have to do something fancy I'd suggest you to create your own trait https://grapesjs.com/docs/modules/Traits.html#define-new-trait-type
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2893
[Question] Can I set for loop value in components render?
Hi,I'm beginner in grapesjs. I want to make a question number by for loop when I dropped components, βI want final like this image. the div...
Issue #2583
Breakpoints don't match media query in canvas
Hey @artf I have multiple breakpoints The problem is that when i am a resolution (set using the icons) like 411 (mobile) not always the can...
Issue #2585
Countdown warning
I have a countdown on my custom trait with the type datetime-local. When i click the element this issue appears. My code: This happens also...
Issue #2865
[QUESTION] enable 'view components' button on panel by default
this button is currently off by default. so you have to turn it on every time, which is not obvious to everyone. how do you make it active...
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.
Tutorial
How to Build a Production GrapesJS Editor: The Complete Walkthrough of Brief, Preset, Plugins, and Services
A complete walkthrough of building a production GrapesJS editor: how to choose a preset, pick plugins, and scope setup services without burning a sprint.
Tutorial
GrapesJS Inline RTE Plugins Update: CKEditor 5 v0.1.4 and Froala Inline Text Editor
CKEditor 5 Inline for GrapesJS v0.1.4 fixes Studio SDK toolbar clipping, iframe injection and link balloon bugs. Compare with Froala Inline β both $69.
Tutorial
Embed GrapesJS in Your SaaS: A Weekend Guide
Embed GrapesJS in your SaaS and ship a white-label page builder over a weekend. Honest tradeoffs, real code, and the plugins that close the UX gap.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.