Lexical: Started dev API outline

This commit is contained in:
Dan Brown
2025-11-30 17:02:17 +00:00
parent 9e8088f186
commit 9d732d8dd8
7 changed files with 129 additions and 10 deletions

View File

@@ -21,6 +21,7 @@ import {CodeBlockDecorator} from "./ui/decorators/code-block";
import {DiagramDecorator} from "./ui/decorators/diagram";
import {registerMouseHandling} from "./services/mouse-handling";
import {registerSelectionHandling} from "./services/selection-handling";
import {EditorApi} from "./api/api";
const theme = {
text: {
@@ -94,6 +95,12 @@ export function createPageEditorInstance(container: HTMLElement, htmlContent: st
registerCommonNodeMutationListeners(context);
// TODO - Emit this as a public event instead
// TODO - Add support to basic editor below
const api = new EditorApi(context);
// @ts-ignore
window.editorApi = api;
return new SimpleWysiwygEditorInterface(context);
}