@lobehub/editor
Version:
A powerful and extensible rich text editor built on Meta's Lexical framework, providing a modern editing experience with React integration.
20 lines (19 loc) • 933 B
TypeScript
import { EditorConfig, LexicalEditor, SerializedElementNode } from 'lexical';
import { CardLikeElementNode } from "../../common";
export type SerializedCodeNode = SerializedElementNode;
export declare class CodeNode extends CardLikeElementNode {
static getType(): string;
static clone(node: CodeNode): CodeNode;
static importJSON(serializedNode: SerializedCodeNode): CodeNode;
createDOM(config: EditorConfig): HTMLElement;
getDOMSlot(element: HTMLElement): import("lexical").ElementDOMSlot<HTMLElement>;
canBeEmpty(): boolean;
isCardLike(): boolean;
isInline(): boolean;
canIndent(): boolean;
canInsertTextBefore(): boolean;
canInsertTextAfter(): boolean;
}
export declare function $createCodeNode(textContent?: string): CodeNode;
export declare function $isCodeInlineNode(node: unknown): node is CodeNode;
export declare function $isSelectionInCodeInline(editor: LexicalEditor): boolean;