From 6e35efb0651eb0649a7d9dc0be02c66e72f53a75 Mon Sep 17 00:00:00 2001 From: fcarraUniSa Date: Thu, 11 Dec 2025 14:10:25 +0100 Subject: [PATCH] Update RichTextEditor.tsx --- components/RichTextEditor.tsx | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/components/RichTextEditor.tsx b/components/RichTextEditor.tsx index df9a704..da44a4f 100644 --- a/components/RichTextEditor.tsx +++ b/components/RichTextEditor.tsx @@ -76,11 +76,11 @@ const RichTextEditor: React.FC = ({ value, onChange, placeholder, classNa e.preventDefault(); // Prevent default button behavior e.stopPropagation(); - const varName = prompt("Enter variable name (without brackets):", "variable_name"); + const varName = prompt("Inserisci nome variabile (senza parentesi):", "nome_variabile"); if (varName) { if (isSourceMode) { - alert("Switch to Visual mode to use the inserter, or type {{name}} manually."); + alert("Passa alla modalità Visuale per usare l'inseritore, oppure scrivi {{nome}} manualmente."); } else { restoreSelection(); const text = `{{${varName}}}`; @@ -136,24 +136,24 @@ const RichTextEditor: React.FC = ({ value, onChange, placeholder, classNa onClick={() => setIsSourceMode(!isSourceMode)} className={`flex items-center gap-1 px-2 py-1.5 rounded text-xs font-medium transition-colors ${isSourceMode ? 'bg-slate-800 text-white' : 'hover:bg-slate-200 text-slate-600'}`} > - {isSourceMode ? <> Visual : <> Source} + {isSourceMode ? <> Visuale : <> Sorgente} {!isSourceMode && ( <> - - - + + +
- - - + + +
- - + +
- +
@@ -161,10 +161,10 @@ const RichTextEditor: React.FC = ({ value, onChange, placeholder, classNa type="button" onClick={insertVariable} className="flex items-center gap-1 px-2 py-1.5 rounded bg-brand-50 text-brand-600 hover:bg-brand-100 text-xs font-medium border border-brand-200" - title="Insert Variable Placeholder" + title="Inserisci Variabile" > - Variable + Variabile )} @@ -195,7 +195,7 @@ const RichTextEditor: React.FC = ({ value, onChange, placeholder, classNa {!value && !isSourceMode && (
- {placeholder || "Start typing..."} + {placeholder || "Inizia a scrivere..."}
)}
@@ -203,4 +203,4 @@ const RichTextEditor: React.FC = ({ value, onChange, placeholder, classNa ); }; -export default RichTextEditor; \ No newline at end of file +export default RichTextEditor;