@ckeditor/ckeditor5-media-embed 48.2.0-alpha.0 → 48.2.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -500,7 +500,9 @@ const mediaPlaceholderIconViewBox = '0 0 64 42';
|
|
|
500
500
|
],
|
|
501
501
|
html: (match)=>{
|
|
502
502
|
const id = match[1];
|
|
503
|
-
|
|
503
|
+
const isTrack = id.startsWith('track/');
|
|
504
|
+
const iframeStyle = isTrack ? 'width: 100%; height: 80px; border: 0; display: block;' : 'width: 100%; height: auto; aspect-ratio: 100 / 126; border: 0; display: block;';
|
|
505
|
+
return '<div>' + `<iframe src="https://open.spotify.com/embed/${id}" ` + `width="300" height="${isTrack ? '80' : '378'}" ` + `style="${iframeStyle}" ` + 'frameborder="0" allowtransparency="true" allow="encrypted-media">' + '</iframe>' + '</div>';
|
|
504
506
|
}
|
|
505
507
|
},
|
|
506
508
|
{
|