mjml icon indicating copy to clipboard operation
mjml copied to clipboard

Default Open Blocks

Open mdkbdg opened this issue 3 years ago • 1 comments

Trying to make "Open Blocks" as default panel when it is open the very first time.

Refering to https://github.com/artf/grapesjs/issues/454

editor.Panels.getButton('views', 'open-blocks').set('active', true)

But when I add the above line, the panel is empty. 'autorender' is not defined which supposed to have its default value

How to make Open Blocks as default opened panel?


What is supposed to look : image

How it look now : image

mdkbdg avatar Feb 23 '21 11:02 mdkbdg

Aha!

I just found it and it now works. Here is how

...
autorender: false
...

editor.on('load', function(){ editor.Panels.getButton('views', 'open-blocks').set('active', true) });
editor.render();

Might help someone

mdkbdg avatar Feb 23 '21 12:02 mdkbdg