From 737a34b950afb05121b13fbafef23209d28daa0c Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Thu, 26 Jun 2025 15:56:49 -0400 Subject: [PATCH] fix: correct placeholder spacing in Edra editor - Add placeholder node styles to editor.css matching other media nodes - Remove incorrect margins from individual placeholder components - Placeholders now properly aligned with 2.25rem horizontal spacing - Consistent with h1, h2, p text elements and YouTube embeds --- src/lib/components/edra/editor.css | 18 ++++++++-- .../components/AudioPlaceholder.svelte | 35 +++++-------------- .../EnhancedImagePlaceholder.svelte | 12 ------- .../components/GalleryPlaceholder.svelte | 12 ------- .../components/GeolocationPlaceholder.svelte | 10 ------ .../components/IFramePlaceholder.svelte | 35 +++++-------------- .../components/UrlEmbedPlaceholder.svelte | 10 ------ .../components/VideoPlaceholder.svelte | 35 +++++-------------- 8 files changed, 43 insertions(+), 124 deletions(-) diff --git a/src/lib/components/edra/editor.css b/src/lib/components/edra/editor.css index 80ae43c..5c2b9b3 100644 --- a/src/lib/components/edra/editor.css +++ b/src/lib/components/edra/editor.css @@ -580,7 +580,14 @@ input[type='checkbox'] { .tiptap .node-image, .tiptap .node-gallery, .tiptap .node-audio, -.tiptap .node-geolocation { +.tiptap .node-geolocation, +.tiptap .node-audio-placeholder, +.tiptap .node-gallery-placeholder, +.tiptap .node-iframe-placeholder, +.tiptap .node-video-placeholder, +.tiptap .node-geolocation-placeholder, +.tiptap .node-image-placeholder, +.tiptap .node-urlEmbedPlaceholder { margin-bottom: 1rem; margin-left: 2.25rem; margin-right: 2.25rem; @@ -609,7 +616,14 @@ input[type='checkbox'] { .tiptap .node-image, .tiptap .node-gallery, .tiptap .node-audio, - .tiptap .node-geolocation { + .tiptap .node-geolocation, + .tiptap .node-audio-placeholder, + .tiptap .node-gallery-placeholder, + .tiptap .node-iframe-placeholder, + .tiptap .node-video-placeholder, + .tiptap .node-geolocation-placeholder, + .tiptap .node-image-placeholder, + .tiptap .node-urlEmbedPlaceholder { margin-left: 2rem; margin-right: 2rem; } diff --git a/src/lib/components/edra/headless/components/AudioPlaceholder.svelte b/src/lib/components/edra/headless/components/AudioPlaceholder.svelte index 7e6f91d..15f5c31 100644 --- a/src/lib/components/edra/headless/components/AudioPlaceholder.svelte +++ b/src/lib/components/edra/headless/components/AudioPlaceholder.svelte @@ -17,37 +17,20 @@ -
- -
+