Issue #923💬 AnsweredOpened March 3, 2018by sura2k0 reactions

Add a select-option to toolbar

Quick answerby sura2k

I was able to manage it by modifying ToolbarButton and its view. But later I decided to expose them by adding those to DomComponents via separate property rather than modifying ToolBar..., so I can extend them and since the changes are few lines, I can easily merge it with new versions of the core. I'm not a javascrip...

Read full answer below ↓

Question

I have read the code and only I could find out that there is only a list of ToolbarButton associated with the toolbar. I have a special trait that I would like to put it into the toolbar because it is very important to see the user which component has this trait and also to change it on the designer/canvas without having many clicks. And this select-option should only be available to some types of blocks. I think I can try to update the trait value via an event, if I can add a select-option to the tool bar. Appreciate any help.

Answers (3)

sura2kMarch 4, 2018

I was able to manage it by modifying ToolbarButton and its view. But later I decided to expose them by adding those to DomComponents via separate property rather than modifying ToolBar..., so I can extend them and since the changes are few lines, I can easily merge it with new versions of the core....

vtsoftFebruary 7, 2019

Hi @sura2k, I also want to add a select option to toolbar. Can you please share your ideas/code/script on how did you implement it?

 Thanks in advance.
lock[bot]February 7, 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.