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
Can we able to use Wistia in GrapesJS editor. I would like to use it as Vimeo uβ¦
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
GrapesJS DevTools: A Developer Panel Inside Your Editor
If you've ever debugged GrapesJS with console.log(editor.getSelected()) and a dozen throwaway event listeners β this post is for you.
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
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.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.