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.

27 lines (26 loc) 1.3 kB
import { DOMConversionMap, DOMExportOutput, DecoratorNode, EditorConfig, LexicalEditor, LexicalNode, LexicalUpdateJSON, SerializedLexicalNode, Spread } from 'lexical'; export type SerializedMentionNode = Spread<{ label?: string; metadata?: Record<string, unknown>; }, SerializedLexicalNode>; export declare class MentionNode extends DecoratorNode<any> { static getType(): string; static clone(node: MentionNode): MentionNode; static importJSON(serializedNode: SerializedMentionNode): MentionNode; static importDOM(): DOMConversionMap | null; __label: string; __metadata: Record<string, unknown>; constructor(label?: string, metadata?: Record<string, unknown>, key?: string); get label(): string; get metadata(): Record<string, unknown>; exportDOM(): DOMExportOutput; createDOM(config: EditorConfig): HTMLElement; getTextContent(): string; isInline(): true; updateDOM(): boolean; exportJSON(): SerializedMentionNode; updateFromJSON(serializedNode: LexicalUpdateJSON<SerializedMentionNode>): this; decorate(editor: LexicalEditor): any; } export declare function $createMentionNode(label?: string, metadata?: Record<string, unknown>): MentionNode; export declare function $isMentionNode(node: LexicalNode): node is MentionNode;