1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-09 10:22:51 +03:00

Lexical: Started comment implementation

Refactors some UI and toolbar code for better abstract use across editor
versions.
This commit is contained in:
Dan Brown
2025-06-24 17:47:53 +01:00
parent dfeca246a0
commit c606970e38
5 changed files with 149 additions and 144 deletions

View File

@@ -198,7 +198,7 @@ export class EditorUIManager {
contentByTarget.set(targetEl, [])
}
// @ts-ignore
contentByTarget.get(targetEl).push(...definition.content);
contentByTarget.get(targetEl).push(...definition.content());
}
}

View File

@@ -4,7 +4,7 @@ import {el} from "../../utils/dom";
export type EditorContextToolbarDefinition = {
selector: string;
content: EditorUiElement[],
content: () => EditorUiElement[],
displayTargetLocator?: (originalTarget: HTMLElement) => HTMLElement;
};