function customizeOptions(editor) { const panelManager = editor.Panels; const command = editor.Commands // Command for opening the edit command.add('custom-clear-canvas', { run: function(editor, sender) { // Clear components editor.DomComponents.clear(); // Clear styles editor.CssComposer.clear(); // Clear undo history editor.UndoManager.clear(); // Make message let msg = `
`; // Send notification UIkit.notification({ message: msg, status: 'primary', pos: 'bottom-right', group: 'message', timeout: 3000 }); } }); // Options button manager panelManager.getButton('options', 'sw-visibility').set({ id: "sw-visibility", className: 'gjs-pn-btn', command: "sw-visibility", active: true, label: `` }); panelManager.getButton('options', 'preview').set({ id: "preview", className: 'gjs-pn-btn', command: "preview", active: false, label: `` }); panelManager.getButton('options', 'fullscreen').set({ id: "fullscreen", className: 'gjs-pn-btn', command: "fullscreen", active: false, label: `` }); panelManager.getButton('options', 'export-template').set({ id: "export-template", className: 'gjs-pn-btn', command: "export-template", active: false, label: `` }); // Adding new button panelManager.addButton('options', [{ id: 'clear-canvas', className: 'gjs-pn-btn', command: 'custom-clear-canvas', active: false, label: `` }, ]); }