lexical-vue
Version:
An extensible Vue 3 web text-editor based on Lexical.
27 lines (26 loc) • 1.11 kB
TypeScript
import * as __VLS_VINE from 'vue-vine/internals';
import type { EditorState, EditorThemeClasses, HTMLConfig, Klass, LexicalEditor, LexicalNode, LexicalNodeReplacement } from 'lexical';
export type InitialEditorStateType = null | string | EditorState | ((editor: LexicalEditor) => void);
export type InitialConfigType = Readonly<{
namespace: string;
nodes?: ReadonlyArray<Klass<LexicalNode> | LexicalNodeReplacement>;
onError: (error: Error, editor: LexicalEditor) => void;
editable?: boolean;
theme?: EditorThemeClasses;
editorState?: InitialEditorStateType;
html?: HTMLConfig;
}>;
type __VLS_VINE_LexicalComposer_emits__ = __VLS_NormalizeEmits<__VLS_VINE.VueDefineEmits<{
error?: [error: Error, editor: LexicalEditor];
}>>;
export declare function LexicalComposer(props: __VLS_VINE.VineComponentCommonProps & {
initialConfig: InitialConfigType;
} & {
onError?: __VLS_VINE_LexicalComposer_emits__['error'];
}, context: {
slots: {
default: unknown;
};
}): __VLS_VINE.VueVineComponent;
export declare function useLexicalComposer(): LexicalEditor;
export {};