How to use the prismic-dom.RichText.asText function in prismic-dom

To help you get started, we’ve selected a few prismic-dom examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wellcometrust / wellcomecollection.org / common / services / prismic / parsers.js View on Github external
export function asText(maybeContent: ?HTMLString): ?string {
  return maybeContent && RichText.asText(maybeContent).trim();
}
github wellcometrust / wellcomecollection.org / server / services / prismic-parsers.js View on Github external
export function asText(maybeContent: any) {
  if (!Array.isArray(maybeContent)) return '';

  return maybeContent && RichText.asText(maybeContent).trim();
}
github wellcometrust / wellcomecollection.org / server / filters / prismic.js View on Github external
export function prismicAsText(content) {
  return RichText.asText(content).trim();
}

prismic-dom

Set of helpers to manage Prismic data

Apache-2.0
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis