mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-07 23:03:00 +03:00
Lexical: Worked on toolbar styling, got format submenu working
This commit is contained in:
@@ -20,7 +20,7 @@ export class EditorFormatMenu extends EditorContainerUiElement {
|
||||
class: 'editor-format-menu editor-dropdown-menu-container',
|
||||
}, [toggle, menu]);
|
||||
|
||||
handleDropdown(toggle, menu);
|
||||
handleDropdown({toggle : toggle, menu : menu});
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
@@ -33,6 +33,15 @@ export class EditorFormatMenu extends EditorContainerUiElement {
|
||||
this.updateToggleLabel(child.getLabel());
|
||||
return;
|
||||
}
|
||||
|
||||
if (child instanceof EditorContainerUiElement) {
|
||||
for (const grandchild of child.getChildren()) {
|
||||
if (grandchild instanceof EditorButton && grandchild.isActive()) {
|
||||
this.updateToggleLabel(grandchild.getLabel());
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.updateToggleLabel(this.trans('Formats'));
|
||||
|
Reference in New Issue
Block a user