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)
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
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.
Isn't there any way to have two panels with different blocks?
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1672
[Bug] Item drop duplicates after opening Layers Panel.
Hi i'm a novice posting an issue for the first time. Please let me know if you need any more information for the query. grapesjs version:0....
Issue #1472
[QUESTIONS] Custom Code block and JS
Wondering if there is a limitation or is it actually possible to create a block that allows the user of the editor to write custom javascri...
Issue #1369
[BUG] Class of a block doesn't always show in the classes section
Hello everyone, I have added many custom blocks and gave the same css class to all the images in those blocks. Let's call it for now 'image...
Issue #1420
Customizing Block(section block) While Dragging it
Hi I have seen that there was two separate blocks to add 'sections' and 'columns'.We have a flow like when we drag a section into canvas ne...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.