{ const url = item.cardData.href?.trim(); if (!url) return; const id = matcher(url); if (!id) { errorMessage = 'Please enter a valid YouTube URL'; return; } item.cardData.youtubeId = id; item.cardData.poster = `https://i.ytimg.com/vi/${id}/hqdefault.jpg`; item.cardData.showInline = true; item.w = 4; item.mobileW = 8; item.h = 3; item.mobileH = 5; oncreate?.(); }} class="flex flex-col gap-2" > Enter a YouTube URL {#if errorMessage}

{errorMessage}

{/if}