Issue #1716Opened January 8, 2019by chiqui3d0 reactions

Block in Pannels?

Question

I'm looking for a way to add a group of blocks to a custom panel, I'm talking about blocks and not buttons because they need to be "Drag and Drop"? What possibilities do I have?

Answers (3)

artfJanuary 13, 20190 reactions

Hi @chiqui3d you can tell the editor when to append blocks at initialization:

grapesjs.init({
	...
	blockManager: {
		appendTo: '#block-container',
	}
})

and then using the BlockManager.render method (check the example) to render filtered blocks

chiqui3dJanuary 13, 20190 reactions

Thank you @artf , but I still see that this is only valid for one panel, I do not see the way to have two panels, one for some blocks with their categories and another to have other blocks with other categories.

This makes it impossible for me to have a presets panel independent of the normal blocks, because I could add it manually, but then I wouldn't be able to implement the functions your API.

chiqui3dJanuary 13, 20190 reactions

Isn't there any way to have two panels with different blocks?

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.