import React from "react"; import { PluggableList } from "unified"; import { TestableComponent } from "../../components"; import { HtmlContentBlockProps } from "../../components/Typography"; export interface MarkdownProps extends TestableComponent { children: string; /** * Allow HTML as partial content, otherwise escape HTML tags. * Use with caution! */ allowHtml?: boolean; /** * Return an object that only contains simple text without any HTML. */ removeMarkup?: boolean; /** * If defined, only elements from this list will be rendered. * This overwrites the removeMarkup parameter if both are set. */ allowedElements?: string[]; /** * Do not wrap content in a `HtmlContentBlock` component. * This option is ignored if `htmlContentBlockProps` or `data-test-id` is given. */ inheritBlock?: boolean; /** * Additional reHype plugins to execute. * @see https://github.com/remarkjs/react-markdown#architecture */ reHypePlugins?: PluggableList; /** * Name for browser target where links withing the Markdown content are opened. * Set to `false` to disable this feature. */ linkTargetName?: false | string; /** * Configure the `HtmlContentBlock` component that is automatically used as wrapper for the parsed Markdown content. */ htmlContentBlockProps?: Omit; /** * Maximum number of raw Markdown characters to render. * Content exceeding this limit is truncated at the nearest safe paragraph * boundary (or word boundary as fallback) to preserve Markdown structure. * No truncation when absent or ≤ 0. */ cutOff?: number; /** * Text appended as a trailing paragraph when content is truncated by `cutOff`. * Set to `""` to suppress the indicator entirely. * Defaults to `…` (…). */ cutOffSuffix?: string; } export declare const markdownAllowedInlineElements: string[]; export declare const markdownAllowedBlockElements: string[]; /** Renders a markdown string. */ export declare const Markdown: ({ children, allowHtml, removeMarkup, inheritBlock, allowedElements, reHypePlugins, linkTargetName, htmlContentBlockProps, cutOff, cutOffSuffix, ...otherProps }: MarkdownProps) => React.JSX.Element;