Closed MeatWant closed 2 years ago
Hi there,
You can modify the config before the editor is initialized, Please the issue #18 -- So use that method to add blocks via config.
You can read the documentation here to learn how to add blocks via config.
Thanks, pushed me in the right direction. Only thing i need was, set api to true
'expose_api' => true,
and get the BlockManager
window.gjsEditor.BlockManager.add( ....... )
Yes, this is a way but that is not recommended as you are exposing the editor API to the end-user.
Hi,
how can i access the Blockmanager, to add Blocks after editor is loaded. Maybe this way:
blockManager.add('1_row', { label: ' <i class="fas fa-window-maximize"></i> Zeile', // attributes: { class: 'total' }, category: { label: 'Struktur', open: false, order: 5, }, content: { tagName: 'div', name: 'Zeile', draggable: true, unstylable: ['font-family'], attributes: { 'class': 'row', 'data-gjs-droppable' : '.row-cell' }, components: [ { tagName: 'div', name: 'Spalte', attributes: { 'class': 'row-cell', 'data-gjs-draggable' : '.row' }, content: '' }, ] } });
Where is the blockmanager defined? or where can i define it? Thanks