UNPKG

lexical

Version:

Lexical is an extensible text editor framework that provides excellent reliability, accessible and performance.

33 lines (32 loc) 1.42 kB
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import type { EditorConfig } from '../LexicalEditor'; import type { DOMConversionMap, LexicalNode, NodeKey } from '../LexicalNode'; import { type SerializedTextNode, type TextDetailType, type TextModeType, TextNode } from './LexicalTextNode'; export type SerializedTabNode = SerializedTextNode; /** @noInheritDoc */ export declare class TabNode extends TextNode { static getType(): string; static clone(node: TabNode): TabNode; constructor(key?: NodeKey); static importDOM(): DOMConversionMap | null; createDOM(config: EditorConfig): HTMLElement; static importJSON(serializedTabNode: SerializedTabNode): TabNode; /** * Always normalizes the stored content to `'\t'` regardless of input — see * comment below for the rationale. */ setTextContent(_text: string): this; spliceText(offset: number, delCount: number, newText: string, moveSelection?: boolean): TextNode; setDetail(detail: TextDetailType | number): this; setMode(type: TextModeType): this; canInsertTextBefore(): boolean; canInsertTextAfter(): boolean; } export declare function $createTabNode(): TabNode; export declare function $isTabNode(node: LexicalNode | null | undefined): node is TabNode;