1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-12-14 19:42:14 +03:00

Lexical API: Started working on docs format and jest testing

This commit is contained in:
Dan Brown
2025-12-04 21:13:17 +00:00
parent 9d732d8dd8
commit ebceba0afe
6 changed files with 221 additions and 11 deletions

View File

@@ -0,0 +1,13 @@
import {createTestContext} from "lexical/__tests__/utils";
import {EditorApi} from "../api";
import {EditorUiContext} from "../../ui/framework/core";
/**
* Create an instance of the EditorApi and EditorUiContext.
*/
export function createEditorApiInstance(): { api: EditorApi; context: EditorUiContext } {
const context = createTestContext();
const api = new EditorApi(context);
return {api, context};
}