20 lines
742 B
TypeScript
20 lines
742 B
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 { RootNode, TextNode } from 'lexical';
|
|
/**
|
|
* Finds a TextNode with a size larger than targetCharacters and returns
|
|
* the node along with the remaining length of the text.
|
|
* @param root - The RootNode.
|
|
* @param targetCharacters - The number of characters whose TextNode must be larger than.
|
|
* @returns The TextNode and the intersections offset, or null if no TextNode is found.
|
|
*/
|
|
export declare function $findTextIntersectionFromCharacters(root: RootNode, targetCharacters: number): null | {
|
|
node: TextNode;
|
|
offset: number;
|
|
};
|