Serializing Rich Text Field JSON

default discord avatar
danielkraemer
last month
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',
        ],
      }
    },
Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

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