feat(email): render shop logo inside WYSIWYG editor (cid swap)

This commit is contained in:
Gerhard Scheikl
2026-05-09 08:05:00 +02:00
parent 573dfbfd50
commit 67204d79ac
4 changed files with 58 additions and 2 deletions
+5
View File
@@ -44,6 +44,9 @@ export const loader = async ({ request }: LoaderFunctionArgs) => {
if (cached) {
logoPreviewDataUrl = `data:${cached.contentType};base64,${Buffer.from(cached.bytes).toString("base64")}`;
}
} else if (settings.logoUrl) {
// External HTTPS URL — fine to display directly in the editor.
logoPreviewDataUrl = settings.logoUrl;
}
return { settings, logoPreviewDataUrl };
};
@@ -391,6 +394,7 @@ export default function SettingsRoute() {
defaultValue={settings.emailBodyHtmlDe || DEFAULT_EMAIL_BODY_DE}
variables={EMAIL_VARS}
minHeight={220}
logoDataUrl={logoPreviewDataUrl}
/>
<Field
@@ -405,6 +409,7 @@ export default function SettingsRoute() {
defaultValue={settings.emailBodyHtmlEn || DEFAULT_EMAIL_BODY_EN}
variables={EMAIL_VARS}
minHeight={220}
logoDataUrl={logoPreviewDataUrl}
/>
</s-stack>
</s-section>