Changeset 1907a18 in Klonkt for src/services/AudioEmbedService.js
- Timestamp:
- 06/15/2026 01:48:56 AM (3 months ago)
- Branches:
- main
- Children:
- d352b63
- Parents:
- 851239c
- File:
-
- 1 edited
-
src/services/AudioEmbedService.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/services/AudioEmbedService.js
r851239c r1907a18 187 187 } 188 188 ); 189 } 190 191 /** 192 * Replace [[embed:<url>]] shortcodes met de platform-iframe (YouTube, Spotify, 193 * SoundCloud, Apple Music, Bandcamp, Vimeo). De editor-knop voegt deze 194 * shortcode in; losse URL-regels embedden ook automatisch via autoembed(). 195 * Niet-ondersteunde/ongeldige URLs krijgen een nette inline-melding. 196 */ 197 static embedMediaShortcodes(html) { 198 if (!html) return html; 199 return html.replace(/\[\[embed:([^\]]+)\]\]/gi, (match, rawUrl) => { 200 const url = rawUrl.trim().replace(/&/g, '&'); 201 const detected = this.detectProvider(url); 202 if (!detected) { 203 return `<div class="post-embed-missing"><em>Embed: niet-ondersteunde of ongeldige URL.</em></div>`; 204 } 205 return this.generateIframe(detected.provider, detected) || match; 206 }); 189 207 } 190 208
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)