How to change order of categories?
> but I was able of adding it only on new categories created.you can do this on all blocks by leveraging from getAll function. more on this here:for your case it might be something like this: cheers! Thank you! I'll try it ASAP. Have a good day.
Read full answer below ↓Question
I saw the changes done by @JuanTincho of adding the "Order" attibute but I was able of adding it only on new categories created. I started from the "GrapesJs-Preset-Webpage". Is there a way of changing the Order after the initial render? This is how I add a new category by adding a new block.
<pre>editor.BlockManager.add('Cards', { label: 'Cards', content: '<div class="ic-cards"><span>Put your content here</span></div>', category:{ label: 'MyCategory', order: 1, open: true }, attributes: { title: 'Insert Cards', class: 'fa fa-cube' } });</pre>Answers (3)
> but I was able of adding it only on new categories created.you can do this on all blocks by leveraging from getAll function. more on this here:for your case it might be something like this: cheers! Thank you! I'll try it ASAP. Have a good day.
but I was able of adding it only on new categories created. you can do this on all blocks by leveraging from getAll function. more on this here: for your case it might be something like this: cheers!
Why am I getting an error "Uncaught TypeError: n is undefined" here? In the post #780 it should be possible to change the order of blocks in the following way const bm = editor.BlockManager; ["link", "map", "h-navbar", "countdown", "form", ... ].forEach(function (item) { bm.remove( item ); }); cons...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3177
QUESTION/FEATURE REQUEST: Changing Selected Component Tooltip
Is there a way through the api to change the selected component tooltip or is that something that can only be done by editing the source? I...
Issue #2039
[QUESTIONS] How can I update the styles of a class?
Hi, so I have this button, whose style changes when hovered, a new class is added: <button class="btn btnhovered">Button 1</button> <button...
Issue #1659
[Question] How to upload PDF and others files - GrapesJS
Hi @artf, I started using your web builder a few days ago and I found it very well done ! I was able to customize it in my own way but I ha...
Issue #1683
How to change id/class when new element drop on editor or render element with dynamic ip?
Hello @artf , Hope you are doing well. I have two questions regards dynamic blocks adding, 1) Is it possible to render the block with dynam...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →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.