import type {NodeKey} from "lexical/LexicalNode";
import {EditorContextToolbar, EditorContextToolbarDefinition} from "./toolbars";
import {getLastSelection, setLastSelection} from "../../utils/selection";
+import {DropDownManager} from "./helpers/dropdowns";
export type SelectionChangeHandler = (selection: BaseSelection|null) => void;
protected activeContextToolbars: EditorContextToolbar[] = [];
protected selectionChangeHandlers: Set<SelectionChangeHandler> = new Set();
+ public dropdowns: DropDownManager = new DropDownManager();
+
setContext(context: EditorUiContext) {
this.context = context;
this.setupEventListeners(context);
if (selectionChange) {
editor.update(() => {
const selection = $getSelection();
+ // console.log('manager::selection', selection);
this.triggerStateUpdate({
editor, selection,
});