[SOLVED] I need A custom category of blocks to appear in another panel/div
Question
I could use appendto to move the ALL the blocks anywhere I want but how do I move a particular category of blocks. I need them to appear seperately.
Answers (1)
Nvm found the solution
define your category like so
blockManager.get('my_block').set('category', 'custom_defined_category');
and then
const blocks = blockManager.getAll();
const filtered = blocks.filter(block => block.get('category') == 'custom_defined_category')
const newBlocksEl = blockManager.render(filtered,{ external: true });
document.getElementById('some-id').appendChild(newBlocksEl);Related Questions and Answers
Continue research with similar issue discussions.
Issue #3231
BUG: how to change gjs-ckeditor-format component
hi guys, we all know that gjs-ckeditor-plugin working with [data-gjs-type]="text" components. I wanna know , could we change this option? I...
Issue #446
Collapsed Category in Blocks when Grapes Editor is loaded
Hello, I want all the categories listed in Blocks, must be initially in collapsed condition when the Grapes JS Editor is loaded. How can I...
Issue #1294
How to add category for default block manager?
@artf I want put all default blocks to category named "Basic". But I can't find any documents about it. I use editor.BlockManager.getAll()....
Issue #1574
Question, Block content from file
Hi, this is not really an issue but more a question. I'm currently using custom blocks in my GrapesJS editor. This is how I create them : I...
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.