Media module uses entity_browser to manage media select modals. List of the available entity browsers can be found at admin/config/content/entity_browser. By default the media module comes with three entity browsers:
- Gallery media library: It provides an entity browser to select media items for creating a new gallery.
- Media embed: It provides an entity browser for selecting media files to embed in the wysiwyg editor.
- Media library: It provides a general entity browser with a media library which can be used for custom content types.
Adding more widgets to the entity browser
While selecting the media items for the gallery, an entity browser called gallery_media_library is used. Suppose in this modal you want to add a tab for uploading document files. You need to add an entity browser widget for it. You need to follow these steps:
- Go to Configuration > Entity Browsers
- Click on Edit for gallery_media_library
- Go to the widgets section
- In the 'add widget plugin' dropdown, select 'Entity form'
- Fill in the appropriate details and click on Finish.