Multiple block mangers or filtering blocks based on critera
Question
I would like to be able to make separate blocks into groups for different icon on panel. For instance I have buttons A, B & C on panel . "A" block manager will contain 1,2,3 components, "B" block manager will contain 4,5,6 components and so on,
Answers (3)
Create blocks to be grouped with the same category name as below.
const blockManager = editor.BlockManager;
blockManager.add('buttonA', {
id: 'buttonA',
category: 'CategoryA',
label: 'ButtonA',
attributes: { class: 'fa fa-sticky-note-o' },
content: "<div>ButtonA</div>"
});
blockManager.add('buttonB', {
id: 'buttonB',
category: 'CategoryA',
label: 'ButtonB',
attributes: { class: 'fa fa-sticky-note-o' },
content: "<div>ButtonB</div>" });
blockManager.add('button1', {
id: 'button1',
category: 'CategoryB',
label: 'Button1',
attributes: { class: 'fa fa-sticky-note-o' },
content: '<div>Button1</div>'
});
Here ButtonA,ButtonB will be grouped under CategoryA and Button1 under CategoryB
Thank you for the fast response.
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.
Issue #454
Make block manager default open panel?
I tried this code: It works but doing this will hide the device selector in the top left for some reason.
Issue #1428
[Question] Define or hide properties for specific components
Hi, I'm wondering if there is the possibility to define properties for specific components. I mean, when I select the component Image I wou...
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...
Issue #1709
[QUESTION] Is it possible to affect child component's styling through parent component's style manager?
Hello there! Awesome project and thanks for your contribution. I would like to know if it is possible to change the styling of a child comp...
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.