phx-react
Version:
PHX REACT
21 lines (20 loc) • 1.01 kB
TypeScript
import { Spread, type DOMConversionMap, type DOMExportOutput, type EditorConfig, type LexicalNode, type NodeKey, type SerializedTextNode, TextNode } from 'lexical';
export type SerializedMentionNode = Spread<{
mentionName: string;
}, SerializedTextNode>;
export declare class MentionNode extends TextNode {
__mention: string;
static getType(): string;
static clone(node: MentionNode): MentionNode;
static importJSON(serializedNode: SerializedMentionNode): MentionNode;
constructor(mentionName: string, text?: string, key?: NodeKey);
exportJSON(): SerializedMentionNode;
createDOM(config: EditorConfig): HTMLElement;
exportDOM(): DOMExportOutput;
static importDOM(): DOMConversionMap | null;
isTextEntity(): true;
canInsertTextBefore(): boolean;
canInsertTextAfter(): boolean;
}
export declare function $createMentionNode(mentionName: string): MentionNode;
export declare function $isMentionNode(node: LexicalNode | null | undefined): node is MentionNode;