Nevertheless! Party Metaphorically

    @contentful/rich-text-plain-text-renderer
    TypeScript icon, indicating that this package has built-in type declarations

    15.0.0 • Public • Published

    rich-text-plain-text-renderer

    Plain text renderer for the Rich Text document.

    Installation

    Using npm:

    npm install @contentful/rich-text-plain-text-renderer

    Using yarn:

    yarn add @contentful/rich-text-plain-text-renderer

    Usage

    import { documentToPlainTextString } from '@contentful/rich-text-plain-text-renderer';
    
    const document = {
      nodeType: 'document',
      data: {},
      content: [
        {
          nodeType: 'paragraph',
          data: {},
          content: [
            {
              nodeType: 'text',
              value: 'Hello',
              marks: [{ type: 'bold' }],
              data: {}
            },
            {
              nodeType: 'text',
              value: ' world!',
              marks: [{ type: 'italic' }],
              data: {}
            },
          ],
        },
      ]
    };
    
    documentToPlainTextString(document); // -> Hello world!

    Keywords

    none

    Install

    npm i @contentful/rich-text-plain-text-renderer

    DownloadsWeekly Downloads

    30,547

    Version

    15.0.0

    License

    MIT

    Unpacked Size

    123 kB

    Total Files

    10

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar