I'm building a Payload project that uses AI to generate content for some collections when creating or editing them.
From the docs, I assume that I might have two options:
-
Create a custom component for the edit view. For example, a button that opens a modal to configure the AI context, generate the content, and then attach it to the collection form. However, I’m not sure if this is possible—specifically, attaching data to the form from a custom component.
-
Create a custom edit view. The only issue here is that I don’t know much about the Payload CMS UI components. In the docs, I only found Gutter and Default Template. I would like to know if there is a way to see the code for the edit views that Payload generates or if there is a place where I can learn more about creating custom views using Payload UI components.
Can someone clarify my doubts about these two approaches?