Issue #2569Opened February 14, 2020by jdillon0011 reactions

[QUESTION] Show all block categories

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)

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.