Add `link` option to custom input mapping
Is your feature request related to a problem? Please describe.
Currently, the custom input mapping for collection schemas via the .editor() method is very useful. It provides specialized UI for media and icon inputs, which greatly improves the content editing experience.
However, when a schema requires a URL (either an internal path or an external link), the only option is a standard z.string(), which renders a plain text input. This forces content editors to manually type or paste URLs. This experience is inconsistent with the much more user-friendly link pop-up that appears when creating a link directly in the Notion-like Markdown editor. That pop-up allows searching for internal pages, but also let the user input external links too.
The pop-up
Describe the solution you'd like
I propose adding a third option to the custom input mapping: input: 'link'.
When a Zod schema field is configured with this option, Nuxt Studio's form editor would render an input field that includes a button or icon to trigger the existing link editing pop-up.
Describe alternatives you've considered
The only alternative is to continue using a standard z.string(), which requires users to manually manage URLs. This is less intuitive and more prone to typos, especially for complex internal paths.
Additional context
Here is an example of how this feature might be used in a content.config.ts file:
redirectTo: z.string().editor({ input: 'link' }).optional()
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
👀