Sort How Block Categories are displayed.
Question
Is there a method to set how the categories are shown in the Block tab?
Answers (3)
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)
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.
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.
Issue #2211
[QUESTIONS] How to set style for pseudo elements (:after and :before)
Hi, I add STATE in style manager :before and :after but all the styles are applied to the component.
Issue #1368
Resize canvas
Is there a way to have a dynamic resizing of the canvas? i.e not using the Device Manager, but having a drag and drop of the width, similar...
Issue #1791
Name of the destination
@artf, Is there any way to show the name of the destination element ?
Issue #1909
SetComponents is sometimes very slow
Hi all We're working on a newsletter app and are using grapesjs as the email editor with the newsletter preset plguin and some custom chang...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.