{# Reusable media modal, included by admin.twig when needs_editor is true. The editor toolbar "media" button opens this modal. It fetches the list of media files from /admin/media-list (JSON) and, on click, inserts a snippet into the active CodeMirror editor at the cursor. Scope: - Default (content editor): fetches /admin/media-list - Plugin editor (mediaPluginName set): fetches /admin/media-list?plugin= which scans plugins//assets/ instead of content/. - Theme editor (mediaThemeName set): fetches /admin/media-list?theme= which scans themes//assets/ instead of content/. The snippet format depends on the editor's current mode (data-ext): - markdown (md): ![alt](url) - html/php: name - other (css, json, js, ...): the raw URL #}