Serializing Rich Text Field JSON

default discord avatar
danielkraemerlast year
2

In the docs I found the part "Generating HTML" for the rtf-field.


But where should I call this function from my collection config?


https://payloadcms.com/docs/fields/rich-text#generating-html

This is my config for my rtf field:


{
      name: 'content',
      type: 'richText',
      required: true,
      label: 'Content',
      admin: {
        elements: [
            'h2',
            'h3',
            'h4',
            'h5',
            'h6',
            'link',
            'ol',
            'ul',
            'upload'
        ],
        leaves: [
            'bold',
        ],
      }
    },
Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.