Issue #1294✓ SolvedOpened July 18, 2018by FrankiYu5 reactions

How to add category for default block manager?

Quick answerby AnkitKachhadiya4

Hey @MooseFrankenstein Refer this codepen it might help you Codepen Demo Please Try this code:const bm = editor.BlockManager; editor.on('load', () => { editor.BlockManager.render([ bm.get('column1').set('category', ''), bm.get('column2').set('category', ''), bm.get('column3').set('category', ''), bm.get('text').set('c...

Read full answer below ↓

Question

@artf I want put all default blocks to category named "Basic". But I can't find any documents about it.

image

I use editor.BlockManager.getAll().reset(); removed all blocks then use plugin "grapesjs-blocks-basic" to create "Basic" but anything still removed.

Or I just add a category to "gjs-blocks-no-cat", but I can't find anyway.

Thank you for help.

Answers (3)

👍 Most helpfulAnkitKachhadiyaJuly 18, 2018

Hey @MooseFrankenstein Refer this codepen it might help you Codepen Demo Please Try this code:const bm = editor.BlockManager; editor.on('load', () => { editor.BlockManager.render([ bm.get('column1').set('category', ''), bm.get('column2').set('category', ''), bm.get('column3').set('category', ''), b...

manishkumaruitAugust 7, 2018

Hi @artf , I am using your plugin and i want to use blocks in different tabs like blocks,widgets and grids but when i am using the properties of blockManager like blockManager : {appendTo: '#blocks'}. Its showing all blocks in single tabs but i want to show blocks in different-2 tabs which i have l...

FrankiYuJuly 19, 2018

@AnkitKachhadiya Thanks for your help. bm.get(id).set('category', 'your own category'). It works for me. Thanks again. 👍

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 →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.