Issue #364Opened October 2, 2017by cmcintosh4 reactions

Sort How Block Categories are displayed.

Question

Is there a method to set how the categories are shown in the Block tab?

Answers (3)

d3vrApril 22, 20182 reactions

As a (not-so-great and hopefully temporary) workaround, I moved the category I wanted to move using jQuery after the editor was fully initialized:

setTimeout(function(){
    $(".gjs-block-categories>div:last").prependTo(".gjs-block-categories");
}, 1000)
cmcintoshOctober 16, 20171 reactions

We could look at something simple as adding a Weight parameter like CMS's like drupal do. Ill look at the code to see how hard it would be to create a PR.

edwardjiaweiNovember 14, 20171 reactions

Should the plugin added components being sort.

        var editor = grapesjs.init(grapesjsoptions);
        plugins: [ 'gjs-plugin-placeholder'],
        pluginsOpts: {
            'gjs-plugin-placeholder': {/* ...options */},
        }
       //Also added some manually
       editor.BlockManager.add('grid-items', {
            label: 'Grid items',
            content: '<div>Grid code</div>'}
      });

should able to customized afterward like

editor.BlockManager.sort(filter) -- by filter of label, by any config of order in BlockManager.add

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.