{"record":{"id":"145a921ad1b9f94e","repo":"payloadcms/payload","slug":"richtext-field-field-name-field-name","errorCode":null,"errorMessage":"RichText field${field.name ? ` \"${field.name}\"` : ''} is missing the editor prop. For sub-richText fields, the editor props is required, as it would otherwise create infinite recursion.","messagePattern":"RichText field(.+?)\"` : ''\\} is missing the editor prop\\. For sub-richText fields, the editor props is required, as it would otherwise create infinite recursion\\.","errorType":"http","errorClass":"MissingEditorProp","httpStatus":500,"severity":"error","filePath":"packages/payload/src/fields/config/client.ts","lineNumber":387,"sourceCode":"              value: option.value,\n            }\n          } else if (typeof option === 'object') {\n            field.options[i] = {\n              label: option.label,\n              value: option.value,\n            }\n          } else if (typeof option === 'string') {\n            field.options[i] = option\n          }\n        }\n      }\n\n      break\n    }\n\n    case 'richText': {\n      if (!incomingField?.editor) {\n        throw new MissingEditorProp(incomingField) // while we allow disabling editor functionality, you should not have any richText fields defined if you do not have an editor\n      }\n\n      if (typeof incomingField?.editor === 'function') {\n        throw new Error('Attempted to access unsanitized rich text editor.')\n      }\n\n      break\n    }\n\n    case 'tabs': {\n      const field = clientField as unknown as TabsFieldClient\n\n      if (incomingField.tabs?.length) {\n        field.tabs = []\n\n        for (let i = 0; i < incomingField.tabs.length; i++) {\n          const tab = incomingField.tabs[i]\n          const clientTab = {} as unknown as TabsFieldClient['tabs'][0]","sourceCodeStart":369,"sourceCodeEnd":405,"githubUrl":"https://github.com/payloadcms/payload/blob/00c58b35c0ed348ddc22daabf467b139727214fd/packages/payload/src/fields/config/client.ts#L369-L405","documentation":"Thrown during client-field sanitization when a `richText` field has no `editor` property. Payload requires every richText field to declare its editor (e.g. the Lexical adapter) because, unlike top-level fields which can fall back to a default editor, sub-fields (nested in blocks/arrays/tabs) have no default — omitting it would recurse infinitely building the field tree. `MissingEditorProp` aborts sanitization to prevent that.","triggerScenarios":"Defining `{ type: 'richText' }` inside a block or array without an `editor`; nesting richText fields and forgetting the adapter on inner ones; removing the top-level richText editor plugin while keeping richText fields.","commonSituations":"Adding richText to a reusable block field; splitting content into nested richText sub-fields; installing Payload without wiring `richText` in `buildConfig` (no default editor).","solutions":["Pass the same editor adapter to every richText field: `import { RichTextAdapter } ... { type: 'richText', editor: lexicalEditor }`.","Configure a top-level default editor in `buildConfig({ richText })` so top-level fields inherit it, and explicitly pass it to nested sub-fields.","Remove richText fields you do not intend to use."],"exampleFix":"// before\n{ type: 'richText', name: 'body' } // nested in a block -> throws\n// after\nimport { LexicalRichTextAdapter } from '@payloadcms/richtext-lexical'\n{ type: 'richText', name: 'body', editor: new LexicalRichTextAdapter({ features: [] }) }","handlingStrategy":"type-guard","validationCode":"function assertRichTextEditors(fields: Field[]) {\n  for (const f of fields) {\n    if (f.type === 'richText' && !f.editor) {\n      throw new Error(`richText field '${f.name}' is missing the required editor prop`)\n    }\n    if ((f.type === 'array' || f.type === 'blocks') && 'fields' in f) assertRichTextEditors(f.fields as Field[])\n  }\n}","typeGuard":"function richTextHasEditor(f: any): boolean {\n  return f?.type !== 'richText' || (typeof f?.editor === 'object' && f.editor !== null)\n}","tryCatchPattern":null,"preventionTips":["Always pass an `editor` to nested richText fields in blocks/arrays/tabs.","Configure a default `richText` adapter in `buildConfig` for top-level fields.","Remove richText fields you do not actively use."],"tags":["fields","richtext","config","editor","sanitize"],"backgroundTag":null,"analyzedSha":"00c58b35c0ed348ddc22daabf467b139727214fd","analyzedAt":"2026-08-12T20:45:03.758Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}