# zmedia\_has\_chosen

Source: https://zotonic.com/docs/2066/zmedia_has_chosen

URI: https://zotonic.com/id/2066

Language: en



Used by the admin as a callback when a media file has been selected for insertion into the rich-text editor.

The required `id` argument is the selected media resource. The action closes the dialog and calls `window.z_choose_zmedia(Id)`, allowing the active editor to insert the corresponding media marker.

This is the final internal step of the `zmedia` chooser workflow and is not normally wired directly.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2066?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2066?language=en>)
