(media: Record<string, any>)
| 169 | } |
| 170 | |
| 171 | function onMediaSelect(media: Record<string, any>) { |
| 172 | const sourceUrl = getPublicURL() + 'assets/' + media.id; |
| 173 | const tag = media.type.startsWith('audio') ? 'audio' : 'video'; |
| 174 | |
| 175 | mediaSelection.value = { |
| 176 | sourceUrl: replaceUrlAccessToken(sourceUrl, imageToken.value), |
| 177 | width: media.width || 300, |
| 178 | height: media.height || 150, |
| 179 | tag, |
| 180 | type: media.type, |
| 181 | previewUrl: replaceUrlAccessToken(sourceUrl, imageToken.value), |
| 182 | }; |
| 183 | } |
| 184 | |
| 185 | function saveMedia() { |
| 186 | editor.value.fire('focus'); |
nothing calls this directly
no test coverage detected