import type { ReactNode } from "react"; import type { CreateTipTapRichTextBlockOptions, TipTapRichTextBlockProps } from "./common.js"; /** * Creates a pair of rich-text block components that render CMS TipTapRichText * block data as themed text. * * Call the factory once per configuration — at the top level of a file, not * inside a component — and reuse the returned components. Call it again for * differently-configured rich-text blocks (e.g. a generic and a headline-only * one). * * `MjmlTipTapRichTextBlock` renders each text block as `MjmlText` and must be * placed within an `MjmlColumn`. `HtmlTipTapRichTextBlock` renders each text * block as `HtmlText` for raw-HTML contexts (e.g. inside `MjmlRaw`); inside * `MjmlRaw` in an `MjmlColumn`, place `HtmlTipTapRichTextBlock` in a `` and * `` of its own. * * ```ts * export const { MjmlTipTapRichTextBlock, HtmlTipTapRichTextBlock } = createTipTapRichTextBlock({ * textBlockStyles: { * title: { variant: "title" }, * intro: { variant: "intro" }, * }, * }); * ``` */ export declare function createTipTapRichTextBlock = Record>(options?: CreateTipTapRichTextBlockOptions): { /** Renders CMS TipTapRichText block data as one `MjmlText` per text block. Must be placed within an `MjmlColumn`. */ MjmlTipTapRichTextBlock: (props: TipTapRichTextBlockProps) => ReactNode; /** Renders CMS TipTapRichText block data as one `HtmlText` div per text block, for raw-HTML contexts such as `MjmlRaw`. Inside `MjmlRaw` in an `MjmlColumn`, place `HtmlTipTapRichTextBlock` in a `` and `` of its own. */ HtmlTipTapRichTextBlock: (props: TipTapRichTextBlockProps) => ReactNode; };