Issue #2047✓ SolvedOpened May 30, 2019by alikabeer323 reactions

I need A custom category of blocks to appear in another panel/div

快速解答by alikabeer323

Nvm found the solution define your category like so blockManager.get('myblock').set('category', 'customdefinedcategory'); and then const blocks = blockManager.getAll(); const filtered = blocks.filter(block => block.get('category') == 'customdefined_category') const newBlocksEl = blockManager.render(filtered,{ external...

Read full answer below ↓

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)

👍 Most helpfulalikabeer32May 30, 2019
代码片段TEXT
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.

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 →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.