UNPKG

@lobehub/editor

Version:

A powerful and extensible rich text editor built on Meta's Lexical framework, providing a modern editing experience with React integration.

15 lines (14 loc) 651 B
import { LexicalEditor } from 'lexical'; import { Html } from 'mdast'; import { INode } from "../../../editor-kernel/inode"; import type { IEditorPluginConstructor } from "../../../types"; import { MentionNode, SerializedMentionNode } from '../node/MentionNode'; export interface MentionPluginOptions { decorator: (node: MentionNode, editor: LexicalEditor) => any; markdownReader?: (node: Html, children: INode[]) => SerializedMentionNode | null | false; markdownWriter?: (mention: MentionNode) => string; theme?: { mention?: string; }; } export declare const MentionPlugin: IEditorPluginConstructor<MentionPluginOptions>;