UNPKG

@prismicio/client

Version:

The official JavaScript + TypeScript client library for Prismic

13 lines (12 loc) 607 B
import type { RichTextField } from "../types/value/richText"; /** * Serializes a rich text or title field to a plain text string * * @param richTextField - A rich text or title field from Prismic * @param separator - Separator used to join each element, defaults to a space * * @returns Plain text equivalent of the provided rich text or title field * * @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/technologies/templating-rich-text-and-title-fields-javascript} */ export declare const asText: (richTextField: RichTextField, separator?: string) => string;