import { Node } from "prosemirror-model"; /** * A container for holding a snippet of text with before and after text to give * context. This is useful for taking a snapshot of tagged content to store and * present to the user. */ export declare class PlainSingleLine { readonly textBefore: string; readonly text: string; readonly textAfter: string; constructor(textBefore: string, text: string, textAfter: string); eq(other: PlainSingleLine): boolean; } export interface EncodeToPlainSingleLineConstraints { textAfter: number; textBefore: number; text: number; } /** * Encode a range of a ProseMirror node to text. * * "Plain single line" refers to the formatting choices that have been made with * this function: * * - No new lines are included. * - Machine-readable formatting (e.g. HTML) is not used. * - Blocks are flattened into adjacent space-separated text. * */ export declare function encodeToPlainSingleLine(node: Node, options?: { /** * from→to range in the node to encode. If omitted the entire node will be * encoded. Out-of-range values are constrained to the size of the node, and * `constraints` limits are enforced. */ range?: [number, number]; /** * Text-length constraints to apply for each segment of text. If `text` is * exceeded, `textAfter` will be empty. */ constraints?: EncodeToPlainSingleLineConstraints; }): PlainSingleLine;