Adding new button in toolbar
@lauragadea probably you should try to extend default component types (eg. default, image, text, etc.)
Read full answer below βQuestion
Hello,
I am trying to add a new button to the toolbar of all the components. I been able to add for each component separatly, but not for all of them at once. To note that I want to avoide modifying the file βsrc/grapesjs/dom_components/model/Component.jsβ
Is there a way to do that?
Thank you in advance for yur help!
Answers (3)
@lauragadea probably you should try to extend default component types (eg. default, image, text, etc.)
@lauragadea , please check #266
Yes @JulyanoF , I already have. And it suggests modifying the files βsrc/grapesjs/dom_components/model/Component.jsβ. That is exactly what I am trying to avoid.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #510
Add new class programatically
Hello Artf, I want to edit the styles of components (mostly imported html) without modifying all components with the same class. I tried to...
Issue #913
Using Style tag instead of css
Hi, I've been taking a look inside of the dom_components, but cant seem to figure out how to manually override the styling aspect. I need a...
Issue #1113
New trait type is not working with rendered components?
Hello, thanks for the great framework. I'm trying to apply this to my project. I want to add a new trait for existing LINK '<a>' component....
Issue #3608
Disable Dragging
What are you trying to add to GrapesJS? I have implemented an alternative text editing component (not based on RTE). I want people to be ab...
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 Much Does It Cost to Build a SaaS Page Builder in 2026?
How much does it cost to build a SaaS page builder in 2026? Explore realistic development costs, timelines, features, and how using GrapesJS can reduce
Tutorial
PageKit: the GrapesJS application you'd have to build anyway
A source-available Next.js app around the open-source GrapesJS core β publishing, custom domains, leads, checkout and a plugin loader.
Tutorial
UnStudio for GrapesJS: 4 Plugins to Build Better Visual Editors
Meet UnStudio, a new GrapesJS plugin studio with four tools, safer and better editor: Command Palette, Responsive Pack, Autosave & Restore, and Autofill
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.