Issue #755💬 AnsweredOpened January 13, 2018by punkt20 reactions

Left and right Panel

快速解答by artf

I'd just add in PanelView and put some checks in PanelView.render (just to avoid those hard coded attrs), then when you create panels you just pass attributes key

Read full answer below ↓

Question

Hi,

for my project i need two panels, left and right, to show blocks/layers and style simultaneously. The panel id is hard coded in the command view files (OpenBlocks, OpenLayers). It would be good if this is configurable. I can do a pull request, but i am not sure, in which files I should put the configuration (panelId).

@artf Can you give me a hint?

Answers (2)

artfJanuary 13, 2018

I'd just add

attributes() {
    return this.model.get('attributes');
 },

in PanelView and put some checks in PanelView.render (just to avoid those hard coded attrs), then when you create panels you just pass attributes key

editor.Panels.addPanel({
	id: '...',
	attributes: { ... }
});
lock[bot]September 18, 2019

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.