@lexical/overflow
Version:
This package contains selection overflow helpers and nodes for Lexical.
25 lines (24 loc) • 1.05 kB
TypeScript
/**
* 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, LexicalNode, RangeSelection, SerializedElementNode } from 'lexical';
import { ElementNode } from 'lexical';
export type SerializedOverflowNode = SerializedElementNode;
/** @noInheritDoc */
export declare class OverflowNode extends ElementNode {
/** @internal */
$config(): import("lexical").StaticNodeConfigRecord<"overflow", {
$transform(node: OverflowNode): void;
extends: typeof ElementNode;
}>;
createDOM(config: EditorConfig): HTMLElement;
updateDOM(prevNode: this, dom: HTMLElement): boolean;
insertNewAfter(selection: RangeSelection, restoreSelection?: boolean): null | LexicalNode;
excludeFromCopy(): boolean;
}
export declare function $createOverflowNode(): OverflowNode;
export declare function $isOverflowNode(node: LexicalNode | null | undefined): node is OverflowNode;