diff --git a/memento-note/app/(main)/insights/page.tsx b/memento-note/app/(main)/insights/page.tsx
index 15ebda7..7b0bd18 100644
--- a/memento-note/app/(main)/insights/page.tsx
+++ b/memento-note/app/(main)/insights/page.tsx
@@ -29,6 +29,8 @@ import { getNoteById } from '@/app/actions/notes'
import type { Note as NoteFull } from '@/lib/types'
import { X, Maximize2 } from 'lucide-react'
import DOMPurify from 'dompurify'
+import { MarkdownContent } from '@/components/markdown-content'
+import 'katex/dist/katex.min.css'
const NetworkGraph = dynamic(
() => import('@/components/network-graph').then(m => ({ default: m.NetworkGraph })),
@@ -277,6 +279,22 @@ export default function InsightsPage() {
const closePeek = () => setPeekNote(null)
+ // Rendu KaTeX pour les notes richtext (data-latex)
+ useEffect(() => {
+ if (!peekNote || peekNote.isMarkdown) return
+ const timer = setTimeout(async () => {
+ const container = document.getElementById('insights-peek-content')
+ if (!container) return
+ const katex = (await import('katex')).default
+ container.querySelectorAll('.math-equation-block[data-latex], .inline-math[data-latex]').forEach(el => {
+ const latex = el.getAttribute('data-latex') || ''
+ const isDisplay = el.classList.contains('math-equation-block')
+ try { el.innerHTML = katex.renderToString(latex, { displayMode: isDisplay, throwOnError: false }) } catch {}
+ })
+ }, 100)
+ return () => clearTimeout(timer)
+ }, [peekNote])
+
const openPeekFully = () => {
if (!peekNote) return
router.push(`/home?openNote=${peekNote.id}`)
@@ -932,7 +950,11 @@ export default function InsightsPage() {
{peekNote.title || t('insightsView.unknownNote')}
{peekNote.content ? (
+ peekNote.isMarkdown ? (
+
—
)}