Issue #2569๐Ÿ’ฌ AnsweredOpened February 14, 2020by jdillon0011 reactions

Show all block categories

Quick answerby pouyamiralayiโค 1

#318 comment

Read full answer below โ†“

Question

Hi all, I am using the following bit of code to collapse all the block categories, what would the code be to expand them all?

const categories = editor.BlockManager.getCategories();
categories.each(category => {
	category.set('open', false).on('change:open', opened => {
		opened.get('open') && categories.each(category => {
            category !== opened && category.set('open', false)
        })
	})
})

Answers (1)

pouyamiralayiโ€ข February 17, 2020

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.