import { Location } from 'slate'; import type { DTRSettings, RichTextEditor, _RichTextNode } from '../types'; /** * This method replaces text at a given selection and then selects the text that replaced it, e.g. * 1. "A block with to be replaced" - "original text" is the selection (location) * 2. "new text" is the default text to replace it * 3. "A block with to be replaced" is the result, with "new text" selected */ export declare const insertTextAndSelect: (editor: RichTextEditor, location: Location, defaultText: string) => void; /** * applyDtr is used to wrap a text in a span with a data attribute containing the query parameter to use */ export declare const applyDTR: (editor: RichTextEditor, location: Location | null, dtrSettings: DTRSettings) => void; /** * wrapWithDtr will wrap a node with a DTR-type element * for a given editor selection */ export declare const wrapWithDTR: (editor: RichTextEditor, dtrSettings: DTRSettings) => void; export declare const getSampleDTRMethodText: (method: DTRSettings['method']) => string; export declare const dtrIDMatcher: (id: number) => (n: _RichTextNode | RichTextEditor) => boolean;