Trait Button Command not working on 0.17.4
@maekawataiki This is fixed, but not yet released - https://github.com/artf/grapesjs/issues/3497
Read full answer below ↓Question
Version:0.17.4
The trait with type button does not call command on 0.17.4 which is used to work before 0.17.3.
Expected Behaviour
Clicking button invoke command defined in trait.
What is happening
Clicking button does nothing
jsfiddle example
Command working on 0.17.3 -> https://jsfiddle.net/7pmz4u1v/3/ Command not working on 0.17.4 -> https://jsfiddle.net/7pmz4u1v/4/
Answers (2)
@maekawataiki This is fixed, but not yet released - https://github.com/artf/grapesjs/issues/3497
Thanks for reporting this, @maekawataiki. Great question about Trait Button Command not working on 0.17.4. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for the on() event listener method Most operat...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3251
How can I specify position of dropped element ?
I want to specify the position of dragging element. for example, if I have a header block which no matter where you drag, it should be plac...
Issue #3432
Hi @artf, Can we able to use Wistia in GrapesJS editor. I would like to use it as Vimeo used in the editor. Scenario: I have a video in my...
Issue #3303
Category order not displaying properly
Hi! I want to display the categories in block manager in certain sequence. I looked into docs and previous issues and found about order att...
Issue #4388
button traits command not working
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? any browser Reproducible demo link https:/...
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
Big Updates: TinyMCE 8 and Placeholder 2.0 for GrapesJS
In May we shipped major updates to two of our most popular GrapesJS plugins — TinyMCE Inline Text Editor and Placeholder.
Tutorial
Find the Right GrapesJS Plugin in Seconds: Smarter Discovery Is Live
We're shipping a set of discovery upgrades. New label filters, a proper compatibility switch for GrapesJS vs Studio, one-click and a smarter sort bar.
Tutorial
GrapesJS vs Webflow vs Tilda (2026): Honest Comparison, Pricing & Which to Pick
GrapesJS vs Webflow vs Tilda compared head-to-head: real 2026 pricing, SEO features, code export, and which one actually fits your project
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.