From 41b012ae3e318e699d400de148e472926f4bb1e2 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 22 Dec 2025 09:33:09 +0000 Subject: [PATCH] fix: remove custom font size from placeholders and hide embeds in previews - Remove text-sm from MediaPlaceholder and EventPlaceholder to inherit parent font size - Add options to hide media and event embeds in HighlightRenderer preview - Ensures placeholders like [image], [note] match surrounding text size --- src/components/nostr/RichText/Gallery.tsx | 2 +- src/components/nostr/RichText/Mention.tsx | 2 +- src/components/nostr/kinds/HighlightRenderer.tsx | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/nostr/RichText/Gallery.tsx b/src/components/nostr/RichText/Gallery.tsx index 129871c..efbe6e6 100644 --- a/src/components/nostr/RichText/Gallery.tsx +++ b/src/components/nostr/RichText/Gallery.tsx @@ -9,7 +9,7 @@ import { MediaEmbed } from "../MediaEmbed"; import { useRichTextOptions } from "../RichText"; function MediaPlaceholder({ type }: { type: "image" | "video" | "audio" }) { - return [{type}]; + return [{type}]; } interface GalleryNodeProps { diff --git a/src/components/nostr/RichText/Mention.tsx b/src/components/nostr/RichText/Mention.tsx index ea3f29c..330914d 100644 --- a/src/components/nostr/RichText/Mention.tsx +++ b/src/components/nostr/RichText/Mention.tsx @@ -7,7 +7,7 @@ import { getKindName } from "@/constants/kinds"; function EventPlaceholder({ kind }: { kind?: number }) { const name = kind !== undefined ? getKindName(kind) : "event"; - return [{name}]; + return [{name}]; } interface MentionNodeProps { diff --git a/src/components/nostr/kinds/HighlightRenderer.tsx b/src/components/nostr/kinds/HighlightRenderer.tsx index 2adaf6e..3b4a412 100644 --- a/src/components/nostr/kinds/HighlightRenderer.tsx +++ b/src/components/nostr/kinds/HighlightRenderer.tsx @@ -94,7 +94,10 @@ export function Kind9802Renderer({ event }: BaseEventProps) { className="hover:underline hover:decoration-dotted cursor-crosshair text-xs line-clamp-1 break-words" onClick={handleOpenEvent} > - + )}