From 98b055c2a8538e419eb275dde923c0ef02c37463 Mon Sep 17 00:00:00 2001 From: ZHENG-Qi625 Date: Tue, 31 Mar 2026 15:16:24 +0200 Subject: [PATCH 1/3] SCENARIO: Simplified video insertion (see #365). Co-authored-by: Nourhane BOUDAOUD Co-authored-by: Zhenpeng LI --- frontend/scenarios/include_video.feature | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/scenarios/include_video.feature b/frontend/scenarios/include_video.feature index 9a833883..8c7869cf 100644 --- a/frontend/scenarios/include_video.feature +++ b/frontend/scenarios/include_video.feature @@ -8,6 +8,7 @@ Scénario: provenant de YouTube Et une session active avec mon compte Quand j'essaie de remplacer le contenu de la glose par : """ - ![link](https://www.youtube.com/watch?v=JRXkAhMYKEc&ab_channel=ViniciusHenrique) + https://www.youtube.com/watch?v=JRXkAhMYKEc&ab_channel=ViniciusHenrique """ Alors le document comporte la vidéo "https://www.youtube.com/embed/JRXkAhMYKEc" + From 9cead5030e08a9850ce554a7d08d259eb8efd03b Mon Sep 17 00:00:00 2001 From: ZHENG-Qi625 Date: Tue, 12 May 2026 17:56:57 +0200 Subject: [PATCH 2/3] IMPROVEMENT: Simplified video insertion (closes #365). Co-authored-by: Nourhane BOUDAOUD Co-authored-by: Zhenpeng LI --- frontend/src/components/FormattedText.jsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/FormattedText.jsx b/frontend/src/components/FormattedText.jsx index 3b89be66..c47285e2 100644 --- a/frontend/src/components/FormattedText.jsx +++ b/frontend/src/components/FormattedText.jsx @@ -16,6 +16,15 @@ function FormattedText({children, setHighlightedText, selectable, setSelectedTex } }; + const renderLinkOrVideo = ({children, href}) => { + const videoId = getId(href); + if (videoId) { + const embedLink = `https://www.youtube.com/embed/${videoId}`; + return