mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-12-11 19:57:23 +03:00
13 lines
419 B
TypeScript
13 lines
419 B
TypeScript
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};
|
|
} |