Issue #2350✓ SolvedOpened October 23, 2019by AbdiasM14 reactions

How do I add elements/sectors to views container using a custom button in the Panel

Quick answerby pouyamiralayi13

@AbdiasM @ko06 sorry for being late on this! based on #277 Cheers!

Read full answer below ↓

Question

I have added a custom button to the Panel as below: const pm = editor.Panels; pm.addButton('views', { id: 'customButton', className: '', command: { run: function (editor) { alert("Hello"); }, stop: function (editor) { } }, attributes: { class: 'fa fa-address-card-o' }, active: false, }); I would like to add custom elements in the views-container when this button is clicked. Screen shot attached. Could you please help with this?

Answers (3)

👍 Most helpfulpouyamiralayiFebruary 18, 2020

@AbdiasM @ko06 sorry for being late on this! based on #277 Cheers!

hc0127December 12, 2023

Hi, @pouyamiralayi . thanks for your post. I got custom view container. But I wanna use react components on that part. Is it possible? if so, Please help me.

ko06October 24, 2019

is this fixed?

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.