diff --git a/memento-note/components/rich-text-editor.tsx b/memento-note/components/rich-text-editor.tsx index 7639e98..5dfaa3c 100644 --- a/memento-note/components/rich-text-editor.tsx +++ b/memento-note/components/rich-text-editor.tsx @@ -4,7 +4,7 @@ import { useEffect, useRef, useState, useCallback, forwardRef, useImperativeHand import { createPortal } from 'react-dom' import { useLanguage } from '@/lib/i18n' import { useEditor, EditorContent } from '@tiptap/react' -import { BubbleMenu } from '@tiptap/react/menus' +import { BubbleMenu, FloatingMenu } from '@tiptap/react/menus' import StarterKit from '@tiptap/starter-kit' import Underline from '@tiptap/extension-underline' import Placeholder from '@tiptap/extension-placeholder' @@ -25,7 +25,7 @@ import { Quote, CodeXml, Minus, ImageIcon, Type, Highlighter, Link as LinkIcon, Sparkles, Wand2, Scissors, Lightbulb, X, Check, ExternalLink, FileText, Pilcrow, MessageSquare, AlignLeft, AlignCenter, AlignRight, - Superscript as SuperscriptIcon, Subscript as SubscriptIcon, Expand, + Superscript as SuperscriptIcon, Subscript as SubscriptIcon, Expand, Plus, } from 'lucide-react' import { cn } from '@/lib/utils' @@ -115,6 +115,7 @@ function useImageInsert() { export const RichTextEditor = forwardRef( function RichTextEditor({ content, onChange, className, placeholder }, ref) { + const { t } = useLanguage() const imageInsert = useImageInsert() const editor = useEditor({ @@ -159,6 +160,19 @@ export const RichTextEditor = forwardRef )} + {editor && ( + + + + )} + {editor && } diff --git a/memento-note/locales/fr.json b/memento-note/locales/fr.json index 8bbf580..c7f8bd7 100644 --- a/memento-note/locales/fr.json +++ b/memento-note/locales/fr.json @@ -459,6 +459,7 @@ "highlight": "Surligner", "superscript": "Exposant", "subscript": "Indice", + "addBlock": "Ajouter un bloc", "slashHint": "↑↓ naviguer · Entrée insérer · Tab changer de section", "slashLoading": "IA Note réfléchit...", "slashTabAll": "Tout",