Summary
A plugin can register a field widget via admin.fieldWidgets (native format now works since #1483). The widget renders correctly in the entry editor once a field's widget is set to "pluginId:name". However, there appears to be no way to set that widget from the admin UI: the Content Types field editor offers no widget picker.
In the admin bundle, fieldWidgets is only ever consumed to resolve a widget at render time:
fieldWidgets?.find((w) => w.name === widgetName)
There is no code building a list of available widgets (filtered by the field's type) for the schema editor. So the only ways to assign a plugin widget to a field are:
- a seed entry (
{ "slug": "seo", "type": "json", "widget": "pluginId:name" }), or
- writing
_emdash_fields.widget directly (SQL/migration).
Steps to reproduce
- Install a plugin that declares
admin.fieldWidgets: [{ name: "x", label: "X", fieldTypes: ["json"] }].
- In the admin, Content Types → a collection → add or edit a
json field.
- Look for a way to select the plugin widget "X" for that field.
Expected
When editing a field whose type is in a registered widget's fieldTypes, the field editor offers a "Widget" selector listing the matching plugin field widgets (label + pluginId:name), so a non-technical editor can assign it without touching seed/SQL.
Actual
No such selector. The field saves with an empty widget, so the default editor for that type is used. The only way to wire the plugin widget is seed or a direct DB write.
Question / possible intent
Is seed-only assignment by design (matching how @emdash-cms/plugin-field-kit documents usage — seed "widget": "field-kit:list")? If so, a note in the docs plus surfacing the available pluginId:name values somewhere in the admin would help. If not, a widget picker in the field editor would close the loop between "plugin registers a widget" and "editor can use it".
Environment
Summary
A plugin can register a field widget via
admin.fieldWidgets(native format now works since #1483). The widget renders correctly in the entry editor once a field'swidgetis set to"pluginId:name". However, there appears to be no way to set thatwidgetfrom the admin UI: the Content Types field editor offers no widget picker.In the admin bundle,
fieldWidgetsis only ever consumed to resolve a widget at render time:There is no code building a list of available widgets (filtered by the field's
type) for the schema editor. So the only ways to assign a plugin widget to a field are:{ "slug": "seo", "type": "json", "widget": "pluginId:name" }), or_emdash_fields.widgetdirectly (SQL/migration).Steps to reproduce
admin.fieldWidgets: [{ name: "x", label: "X", fieldTypes: ["json"] }].jsonfield.Expected
When editing a field whose
typeis in a registered widget'sfieldTypes, the field editor offers a "Widget" selector listing the matching plugin field widgets (label +pluginId:name), so a non-technical editor can assign it without touching seed/SQL.Actual
No such selector. The field saves with an empty
widget, so the default editor for that type is used. The only way to wire the plugin widget is seed or a direct DB write.Question / possible intent
Is seed-only assignment by design (matching how
@emdash-cms/plugin-field-kitdocuments usage — seed"widget": "field-kit:list")? If so, a note in the docs plus surfacing the availablepluginId:namevalues somewhere in the admin would help. If not, a widget picker in the field editor would close the loop between "plugin registers a widget" and "editor can use it".Environment
fieldWidgetsforjson.