fix: markdown-to-richtext conversion failure prevents type switch
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 46s

- If /api/ai/convert-markdown fails, abort the type change and show error toast
- Only switch to richtext after successful content conversion
- Switching back to markdown always works (no conversion needed)
- Add i18n keys for conversion success/failure messages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Sepehr Ramezani
2026-05-01 16:50:51 +02:00
parent 427e32e813
commit 8ee77956e8
16 changed files with 42 additions and 7 deletions

View File

@@ -207,6 +207,8 @@
"typeMarkdown": "Markdown",
"typeRichText": "Texte riche",
"typeChecklist": "Liste de tâches",
"convertedToRichText": "Converti en texte enrichi",
"conversionFailed": "Échec de la conversion, reste en Markdown",
"richTextPlaceholder": "Prenez une note...",
"switchTypeTitle": "Changer le type de note ?",
"switchTypeWarning": "Certaines mises en forme peuvent être perdues lors du passage en {type}.",