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
This commit is contained in:
Claude
2025-12-22 09:33:09 +00:00
parent 125052f4c9
commit 41b012ae3e
3 changed files with 6 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ import { MediaEmbed } from "../MediaEmbed";
import { useRichTextOptions } from "../RichText";
function MediaPlaceholder({ type }: { type: "image" | "video" | "audio" }) {
return <span className="text-muted-foreground text-sm">[{type}]</span>;
return <span className="text-muted-foreground">[{type}]</span>;
}
interface GalleryNodeProps {

View File

@@ -7,7 +7,7 @@ import { getKindName } from "@/constants/kinds";
function EventPlaceholder({ kind }: { kind?: number }) {
const name = kind !== undefined ? getKindName(kind) : "event";
return <span className="text-muted-foreground text-sm">[{name}]</span>;
return <span className="text-muted-foreground">[{name}]</span>;
}
interface MentionNodeProps {

View File

@@ -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}
>
<RichText content={sourcePreview} />
<RichText
content={sourcePreview}
options={{ showMedia: false, showEventEmbeds: false }}
/>
</div>
)}
</div>