BUG: load blocks closed by default?
See original GitHub issueI am using the following bit of code to collapse all the block categories, unfortunately, this is not working
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)
})
})
})
live demo : https://jsfiddle.net/d4702yoh/2/
What is wrong here?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Fix Block Bug in Project Slayers Mobile - Unable To Change ...
For more information, follow this guide:https://www.techy.how/tutorials/project-slayers-fix- block - bug -unable-to-change-positionA short ...
Read more >Resolve blocking problem caused by lock escalation - SQL ...
Typically, SQL Server's default behavior causes lock escalation to occur only at those times when it would improve performance or when you must ......
Read more >How to Solve the Chunk Load Error in JavaScript - Rollbar
Whenever there's an error observed in dynamically fetching helper JavaScript files known as Chunks, a ChunkLoad Error is thrown.
Read more >Chrome27 stops loading images ("pending") when a "forever ...
The connection is closed and suddendly the smiley will appear. It looks like if images in the browser cache load correctly. So if...
Read more >Pitfalls and Common Mistakes | NGINX
Putting root inside of a location block will work and it's perfectly valid. ... server { server_name www.example.com; root /var/www/nginx-default/; ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That should be enough
editor.Blocks.getCategories().forEach(ct => ct.set('open', false))
but categories are not created until the render of blocks (which happens, by default, when you click the Blocks tab) so you just need to execute that script once are rendered.Thanks your right