mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-09 15:07:10 +02:00
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:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user