You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the media plugin comes with a few hardcoded fields which cover some scenarios, but there is no way to customize it for our own usage. It's possible to fork and make changes, but it's still not easy to add custom fields as the editor needs to be customized.
My idea therefore is for the media plugin to take a list of fields, similar to how we specify the schema for any type. By default the fields would be the ones we have today (title, tags, filename, alt text and description) but it would be possible to add other fields or change the fields that are there today.
To make this possible I think the plugin should use the <FormBuilder>, same as sanity document editor uses. This way it could use all the components for editing fields as any other sanity document uses. For example we want to add a reference to another document from our assets, using the reference field that is default for references. That's not easy to do today, but given a schema with a reference field the FormBuilder would create the input field.
The text was updated successfully, but these errors were encountered:
Currently the media plugin comes with a few hardcoded fields which cover some scenarios, but there is no way to customize it for our own usage. It's possible to fork and make changes, but it's still not easy to add custom fields as the editor needs to be customized.
My idea therefore is for the media plugin to take a list of fields, similar to how we specify the schema for any type. By default the fields would be the ones we have today (title, tags, filename, alt text and description) but it would be possible to add other fields or change the fields that are there today.
To make this possible I think the plugin should use the
<FormBuilder>
, same as sanity document editor uses. This way it could use all the components for editing fields as any other sanity document uses. For example we want to add a reference to another document from our assets, using the reference field that is default for references. That's not easy to do today, but given a schema with a reference field the FormBuilder would create the input field.The text was updated successfully, but these errors were encountered: