feat: render highlight comments with RichText component

Enable support for custom emoji, mentions, hashtags, and other rich text features in highlight comments by using the RichText component instead of plain text rendering.

Changes:
- HighlightRenderer: Use RichText for comment rendering with media/embeds disabled
- HighlightDetailRenderer: Add RichText import and use it for comment rendering
This commit is contained in:
Claude
2026-01-04 19:08:04 +00:00
parent a4eff14620
commit fae12a1908
2 changed files with 13 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ import {
import { EmbeddedEvent } from "../EmbeddedEvent";
import { UserName } from "../UserName";
import { useGrimoire } from "@/core/state";
import { RichText } from "../RichText";
/**
* Detail renderer for Kind 9802 - Highlight
@@ -80,7 +81,11 @@ export function Kind9802DetailRenderer({ event }: { event: NostrEvent }) {
<div className="text-xs text-muted-foreground uppercase tracking-wide">
Comment
</div>
<p className="text-sm leading-relaxed">{comment}</p>
<RichText
content={comment}
className="text-sm leading-relaxed"
options={{ showMedia: false, showEventEmbeds: false }}
/>
</div>
)}

View File

@@ -53,7 +53,13 @@ export function Kind9802Renderer({ event }: BaseEventProps) {
<BaseEventContainer event={event}>
<div className="flex flex-col gap-2">
{/* Comment */}
{comment && <p className="text-sm text-foreground">{comment}</p>}
{comment && (
<RichText
content={comment}
className="text-sm text-foreground"
options={{ showMedia: false, showEventEmbeds: false }}
/>
)}
{/* Highlighted text */}
{highlightText && (