Issue #2852πŸ’¬ AnsweredOpened June 23, 2020by RJCAM1 reactions

Can't enable 2 panel buttons at the same time

Quick answerby RJCAM❀ 1

Thank you @Ju99ernaut , that's exactly what I needed.

Read full answer below ↓

Question

Hi, I'm trying to enable more than one custom panel button at the same time. I think when I create some custom panel button (using code below) they will have the same behavior as normal html radio inputs, meaning that you can only select one and not more then that. See the example below when I try to enable both buttons but one disables the other: I want to enable both buttons at the same time, is there any property that I can add to do so? Here is how I create the panel buttons.

Answers (2)

RJCAMβ€’ June 24, 2020

Thank you @Ju99ernaut , that's exactly what I needed.

Ju99ernautβ€’ June 23, 2020

You have to add a different context for each button

editor.Panels.addButton('options', [{
    //...
    context: 'some string',
    // ...
}]);

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 β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.