@lobehub/editor
Version:
A powerful and extensible rich text editor built on Meta's Lexical framework, providing a modern editing experience with React integration.
11 lines (10 loc) • 702 B
TypeScript
import type { EditorThemeClasses } from 'lexical';
import { type Context } from 'react';
import { IEditor } from "../../types";
export type LexicalComposerContextType = {
getTheme: () => EditorThemeClasses | null | undefined;
};
export type LexicalComposerContextWithEditor = [IEditor, LexicalComposerContextType];
export declare const LexicalComposerContext: Context<LexicalComposerContextWithEditor | null | undefined>;
export declare function createLexicalComposerContext(parent: LexicalComposerContextWithEditor | null | undefined, theme: EditorThemeClasses | null | undefined): LexicalComposerContextType;
export declare function useLexicalComposerContext(): LexicalComposerContextWithEditor;