- {/* Toolbar */}
-
+ {/* Toolbar - sticky within the composer's scroll container so it stays
+ visible while editing long bodies. The background stays at main's
+ bg-muted/30 in every state - backdrop-blur has no visual effect while
+ the toolbar rests on the solid page background, and blurs body text
+ sliding underneath only once pinned, so pinned legibility needs no
+ extra opaque overlay (an always-on stronger overlay would read darker
+ than main even at rest). */}
+
+ {/* Font size - two baseline-aligned A's read as "size" at a glance;
+ once a size is chosen the button shows that number instead. */}
+
+
setFontSizeMenuOpen((v) => !v)}
+ title={tToolbar("font_size")}
+ >
+ {currentFontSize ? (
+
+ {currentFontSize.replace("px", "")}
+
+ ) : (
+
+ A
+ A
+
+ )}
+
+ {fontSizeMenuOpen && (
+
+ {FONT_SIZES.map((size) => (
+
{
+ editor.chain().focus().setFontSize(size).run();
+ setFontSizeMenuOpen(false);
+ }}
+ className={cn(
+ "block w-full text-start px-2 py-1 rounded hover:bg-accent transition-colors",
+ currentFontSize === size && "bg-accent text-accent-foreground"
+ )}
+ style={{ fontSize: size, lineHeight: 1.4 }}
+ >
+ {size}
+
+ ))}
+
+
{
+ editor.chain().focus().unsetFontSize().run();
+ setFontSizeMenuOpen(false);
+ }}
+ >
+ {tToolbar("font_size_default")}
+
+
+ )}
+
+
+
+
editor.chain().focus().toggleBold().run()}
@@ -430,6 +524,60 @@ export function RichTextEditor({
)}
+ {/* Background color - same palette, same grid and same swatch
+ styling as the text-colour picker above, so the two controls
+ read as siblings. The highlighter glyph previews the active
+ tint on its little bar. Inline style="background-color: …"
+ survives email round-trips like `color` does. */}
+
+
setBgColorMenuOpen((v) => !v)}
+ title={tToolbar("background_color")}
+ >
+
+
+
+
+
+ {bgColorMenuOpen && (
+
+
+ {TEXT_COLORS.map((color) => (
+ {
+ editor.chain().focus().setBackgroundColor(color).run();
+ setBgColorMenuOpen(false);
+ }}
+ className={cn(
+ "w-4 h-4 border border-border/60 rounded-[2px] transition-transform hover:scale-110",
+ currentBgColor === color && "ring-1 ring-ring ring-offset-1"
+ )}
+ style={{ backgroundColor: color }}
+ />
+ ))}
+
+
+
{
+ editor.chain().focus().unsetBackgroundColor().run();
+ setBgColorMenuOpen(false);
+ }}
+ >
+ {tToolbar("remove_background_color")}
+
+
+ )}
+
diff --git a/locales/ar/common.json b/locales/ar/common.json
index ac7018dc0..9f0ae9ee9 100644
--- a/locales/ar/common.json
+++ b/locales/ar/common.json
@@ -728,7 +728,11 @@
"delete_column": "حذف العمود",
"toggle_header_row": "تبديل صف الرأس",
"delete_table": "حذف الجدول",
- "pick_size": "اختيار الحجم"
+ "pick_size": "اختيار الحجم",
+ "font_size": "حجم الخط",
+ "font_size_default": "افتراضي",
+ "background_color": "لون الخلفية",
+ "remove_background_color": "إزالة لون الخلفية"
},
"send_filing_warning": "تم الإرسال - لكن التنظيف بعد الإرسال فشل، وقد تبقى مسودة قديمة."
},
diff --git a/locales/ca/common.json b/locales/ca/common.json
index bb0ce968d..a5ba6c6b8 100644
--- a/locales/ca/common.json
+++ b/locales/ca/common.json
@@ -728,7 +728,11 @@
"delete_column": "Elimina la columna",
"toggle_header_row": "Commuta la fila de capçalera",
"delete_table": "Elimina la taula",
- "pick_size": "Tria la mida"
+ "pick_size": "Tria la mida",
+ "font_size": "Mida de la lletra",
+ "font_size_default": "Per defecte",
+ "background_color": "Color de fons",
+ "remove_background_color": "Elimina el color de fons"
},
"send_filing_warning": "Enviat, però la neteja posterior a l'enviament ha fallat; és possible que quedi un esborrany obsolet."
},
diff --git a/locales/cs/common.json b/locales/cs/common.json
index a8d69da24..2e305ceb5 100644
--- a/locales/cs/common.json
+++ b/locales/cs/common.json
@@ -728,7 +728,11 @@
"delete_column": "Odstranit sloupec",
"toggle_header_row": "Přepnout řádek záhlaví",
"delete_table": "Odstranit tabulku",
- "pick_size": "Vybrat velikost"
+ "pick_size": "Vybrat velikost",
+ "font_size": "Velikost písma",
+ "font_size_default": "Výchozí",
+ "background_color": "Barva pozadí",
+ "remove_background_color": "Odebrat barvu pozadí"
},
"send_filing_warning": "Odesláno - ale následný úklid selhal, může zůstat zastaralý koncept."
},
diff --git a/locales/da/common.json b/locales/da/common.json
index 5d1eff6fb..cdd9bdfdd 100644
--- a/locales/da/common.json
+++ b/locales/da/common.json
@@ -728,7 +728,11 @@
"delete_column": "Slet kolonne",
"toggle_header_row": "Slå overskriftsrække til/fra",
"delete_table": "Slet tabel",
- "pick_size": "Vælg størrelse"
+ "pick_size": "Vælg størrelse",
+ "font_size": "Skriftstørrelse",
+ "font_size_default": "Standard",
+ "background_color": "Baggrundsfarve",
+ "remove_background_color": "Fjern baggrundsfarve"
},
"send_filing_warning": "Sendt - men oprydningen bagefter mislykkedes, en forældet kladde kan blive stående."
},
diff --git a/locales/de/common.json b/locales/de/common.json
index 70331f3ab..dbf925f6e 100644
--- a/locales/de/common.json
+++ b/locales/de/common.json
@@ -728,7 +728,11 @@
"delete_column": "Spalte löschen",
"toggle_header_row": "Kopfzeile umschalten",
"delete_table": "Tabelle löschen",
- "pick_size": "Größe wählen"
+ "pick_size": "Größe wählen",
+ "font_size": "Schriftgröße",
+ "font_size_default": "Standard",
+ "background_color": "Hintergrundfarbe",
+ "remove_background_color": "Hintergrundfarbe entfernen"
},
"send_filing_warning": "Gesendet - aber das Aufräumen danach schlug fehl, evtl. bleibt ein alter Entwurf sichtbar."
},
diff --git a/locales/en/common.json b/locales/en/common.json
index 68874b945..e59ad18b0 100644
--- a/locales/en/common.json
+++ b/locales/en/common.json
@@ -728,7 +728,11 @@
"delete_column": "Delete column",
"toggle_header_row": "Toggle header row",
"delete_table": "Delete table",
- "pick_size": "Pick size"
+ "pick_size": "Pick size",
+ "font_size": "Font size",
+ "font_size_default": "Default",
+ "background_color": "Background color",
+ "remove_background_color": "Remove background color"
},
"send_filing_warning": "Sent - but the post-send cleanup failed, a stale draft may remain."
},
diff --git a/locales/es/common.json b/locales/es/common.json
index c4172288e..97ab1052a 100644
--- a/locales/es/common.json
+++ b/locales/es/common.json
@@ -728,7 +728,11 @@
"delete_column": "Eliminar columna",
"toggle_header_row": "Alternar fila de encabezado",
"delete_table": "Eliminar tabla",
- "pick_size": "Elegir tamaño"
+ "pick_size": "Elegir tamaño",
+ "font_size": "Tamaño de fuente",
+ "font_size_default": "Predeterminado",
+ "background_color": "Color de fondo",
+ "remove_background_color": "Quitar color de fondo"
},
"send_filing_warning": "Enviado - pero la limpieza posterior falló, puede quedar un borrador obsoleto."
},
diff --git a/locales/fa/common.json b/locales/fa/common.json
index 9dc030aac..3ef14c7a6 100644
--- a/locales/fa/common.json
+++ b/locales/fa/common.json
@@ -728,7 +728,11 @@
"delete_column": "حذف ستون",
"toggle_header_row": "تغییر وضعیت ردیف سرصفحه",
"delete_table": "حذف جدول",
- "pick_size": "انتخاب اندازه"
+ "pick_size": "انتخاب اندازه",
+ "font_size": "اندازه فونت",
+ "font_size_default": "پیشفرض",
+ "background_color": "رنگ پسزمینه",
+ "remove_background_color": "حذف رنگ پسزمینه"
},
"send_filing_warning": "ارسال شد - اما پاکسازی پس از ارسال ناموفق بود، ممکن است پیشنویس قدیمی باقی بماند."
},
diff --git a/locales/fr/common.json b/locales/fr/common.json
index b844debfc..dc4116756 100644
--- a/locales/fr/common.json
+++ b/locales/fr/common.json
@@ -728,7 +728,11 @@
"delete_column": "Supprimer la colonne",
"toggle_header_row": "Basculer la ligne d'en-tête",
"delete_table": "Supprimer le tableau",
- "pick_size": "Choisir la taille"
+ "pick_size": "Choisir la taille",
+ "font_size": "Taille de police",
+ "font_size_default": "Par défaut",
+ "background_color": "Couleur d'arrière-plan",
+ "remove_background_color": "Supprimer la couleur d'arrière-plan"
},
"send_filing_warning": "Envoyé - mais le nettoyage après envoi a échoué, un ancien brouillon peut subsister."
},
diff --git a/locales/he/common.json b/locales/he/common.json
index e5e7d311d..41c6fda09 100644
--- a/locales/he/common.json
+++ b/locales/he/common.json
@@ -693,7 +693,11 @@
"delete_column": "מחיקת עמודה",
"toggle_header_row": "החלפת שורת כותרת",
"delete_table": "מחיקת טבלה",
- "pick_size": "בחירת גודל"
+ "pick_size": "בחירת גודל",
+ "font_size": "גודל גופן",
+ "font_size_default": "ברירת מחדל",
+ "background_color": "צבע רקע",
+ "remove_background_color": "הסר צבע רקע"
},
"send_filing_warning": "נשלח - אך הניקוי שלאחר השליחה נכשל, ייתכן שתישאר טיוטה ישנה."
},
diff --git a/locales/hu/common.json b/locales/hu/common.json
index 0e07afb34..7091ba8c5 100644
--- a/locales/hu/common.json
+++ b/locales/hu/common.json
@@ -728,7 +728,11 @@
"delete_column": "Oszlop törlése",
"toggle_header_row": "Fejlécsor váltása",
"delete_table": "Táblázat törlése",
- "pick_size": "Méret kiválasztása"
+ "pick_size": "Méret kiválasztása",
+ "font_size": "Betűméret",
+ "font_size_default": "Alapértelmezett",
+ "background_color": "Háttérszín",
+ "remove_background_color": "Háttérszín eltávolítása"
},
"send_filing_warning": "Elküldve - de az utólagos rendrakás nem sikerült, egy elavult piszkozat megmaradhat."
},
diff --git a/locales/it/common.json b/locales/it/common.json
index 48a3ae4f8..d59335b14 100644
--- a/locales/it/common.json
+++ b/locales/it/common.json
@@ -728,7 +728,11 @@
"delete_column": "Elimina colonna",
"toggle_header_row": "Attiva/disattiva riga di intestazione",
"delete_table": "Elimina tabella",
- "pick_size": "Scegli dimensione"
+ "pick_size": "Scegli dimensione",
+ "font_size": "Dimensione carattere",
+ "font_size_default": "Predefinita",
+ "background_color": "Colore di sfondo",
+ "remove_background_color": "Rimuovi colore di sfondo"
},
"send_filing_warning": "Inviato - ma la pulizia successiva non è riuscita, potrebbe restare una bozza obsoleta."
},
diff --git a/locales/ja/common.json b/locales/ja/common.json
index de7e40c0e..80f154e58 100644
--- a/locales/ja/common.json
+++ b/locales/ja/common.json
@@ -728,7 +728,11 @@
"delete_column": "列を削除",
"toggle_header_row": "ヘッダー行の切り替え",
"delete_table": "表を削除",
- "pick_size": "サイズを選択"
+ "pick_size": "サイズを選択",
+ "font_size": "文字サイズ",
+ "font_size_default": "デフォルト",
+ "background_color": "背景色",
+ "remove_background_color": "背景色を削除"
},
"send_filing_warning": "送信されましたが、送信後の整理に失敗しました。古い下書きが残る場合があります。"
},
diff --git a/locales/ko/common.json b/locales/ko/common.json
index 8cb8e3d75..c29c8a570 100644
--- a/locales/ko/common.json
+++ b/locales/ko/common.json
@@ -728,7 +728,11 @@
"delete_column": "열 삭제",
"toggle_header_row": "머리글 행 전환",
"delete_table": "표 삭제",
- "pick_size": "크기 선택"
+ "pick_size": "크기 선택",
+ "font_size": "글자 크기",
+ "font_size_default": "기본값",
+ "background_color": "배경색",
+ "remove_background_color": "배경색 제거"
},
"send_filing_warning": "보냈지만 전송 후 정리에 실패했습니다. 오래된 임시 보관 메일이 남아 있을 수 있습니다."
},
diff --git a/locales/lv/common.json b/locales/lv/common.json
index f38757c6e..a51796997 100644
--- a/locales/lv/common.json
+++ b/locales/lv/common.json
@@ -728,7 +728,11 @@
"delete_column": "Dzēst kolonnu",
"toggle_header_row": "Pārslēgt galvenes rindu",
"delete_table": "Dzēst tabulu",
- "pick_size": "Izvēlēties izmēru"
+ "pick_size": "Izvēlēties izmēru",
+ "font_size": "Fonta izmērs",
+ "font_size_default": "Noklusējums",
+ "background_color": "Fona krāsa",
+ "remove_background_color": "Noņemt fona krāsu"
},
"send_filing_warning": "Nosūtīts - bet pēcapstrāde neizdevās, var palikt novecojis melnraksts."
},
diff --git a/locales/mn/common.json b/locales/mn/common.json
index fdfa0ca40..638cd1555 100644
--- a/locales/mn/common.json
+++ b/locales/mn/common.json
@@ -728,7 +728,11 @@
"delete_column": "Баганыг устгах",
"toggle_header_row": "Толгойн мөрийг сэлгэх",
"delete_table": "Хүснэгт устгах",
- "pick_size": "Хэмжээ сонгох"
+ "pick_size": "Хэмжээ сонгох",
+ "font_size": "Фонтын хэмжээ",
+ "font_size_default": "Үндсэн",
+ "background_color": "Дэвсгэр өнгө",
+ "remove_background_color": "Дэвсгэр өнгийг арилгах"
},
"send_filing_warning": "Илгээсэн - гэхдээ илгээсний дараах цэвэрлэгээ амжилтгүй болсон тул хуучирсан ноорог үлдэж болзошгүй."
},
diff --git a/locales/nb/common.json b/locales/nb/common.json
index 6e53eec2c..68f220ea2 100644
--- a/locales/nb/common.json
+++ b/locales/nb/common.json
@@ -728,7 +728,11 @@
"delete_column": "Slett kolonne",
"toggle_header_row": "Slå overskriftsraden av eller på",
"delete_table": "Slett tabell",
- "pick_size": "Velg størrelse"
+ "pick_size": "Velg størrelse",
+ "font_size": "Skriftstørrelse",
+ "font_size_default": "Standard",
+ "background_color": "Bakgrunnsfarge",
+ "remove_background_color": "Fjern bakgrunnsfarge"
},
"send_filing_warning": "Meldingen ble sendt, men oppryddingen etterpå mislyktes. Et gammelt utkast kan bli liggende."
},
diff --git a/locales/nl/common.json b/locales/nl/common.json
index 14dd7093d..2c78d5afa 100644
--- a/locales/nl/common.json
+++ b/locales/nl/common.json
@@ -728,7 +728,11 @@
"delete_column": "Kolom verwijderen",
"toggle_header_row": "Koprij aan/uit",
"delete_table": "Tabel verwijderen",
- "pick_size": "Grootte kiezen"
+ "pick_size": "Grootte kiezen",
+ "font_size": "Lettergrootte",
+ "font_size_default": "Standaard",
+ "background_color": "Achtergrondkleur",
+ "remove_background_color": "Achtergrondkleur verwijderen"
},
"send_filing_warning": "Verzonden - maar het opruimen daarna is mislukt, mogelijk blijft een oud concept staan."
},
diff --git a/locales/pl/common.json b/locales/pl/common.json
index 57380fb89..805c56ff2 100644
--- a/locales/pl/common.json
+++ b/locales/pl/common.json
@@ -728,7 +728,11 @@
"delete_column": "Usuń kolumnę",
"toggle_header_row": "Przełącz wiersz nagłówka",
"delete_table": "Usuń tabelę",
- "pick_size": "Wybierz rozmiar"
+ "pick_size": "Wybierz rozmiar",
+ "font_size": "Rozmiar czcionki",
+ "font_size_default": "Domyślny",
+ "background_color": "Kolor tła",
+ "remove_background_color": "Usuń kolor tła"
},
"send_filing_warning": "Wysłano - ale późniejsze porządkowanie nie powiodło się, może pozostać nieaktualna wersja robocza."
},
diff --git a/locales/pt/common.json b/locales/pt/common.json
index 2c3f35014..3d5208c45 100644
--- a/locales/pt/common.json
+++ b/locales/pt/common.json
@@ -728,7 +728,11 @@
"delete_column": "Excluir coluna",
"toggle_header_row": "Alternar linha de cabeçalho",
"delete_table": "Excluir tabela",
- "pick_size": "Escolher tamanho"
+ "pick_size": "Escolher tamanho",
+ "font_size": "Tamanho da fonte",
+ "font_size_default": "Padrão",
+ "background_color": "Cor de fundo",
+ "remove_background_color": "Remover cor de fundo"
},
"send_filing_warning": "Enviado - mas a limpeza posterior falhou, um rascunho antigo pode permanecer."
},
diff --git a/locales/ro/common.json b/locales/ro/common.json
index 1f6fd1896..d76697c6e 100644
--- a/locales/ro/common.json
+++ b/locales/ro/common.json
@@ -728,7 +728,11 @@
"delete_column": "Șterge coloana",
"toggle_header_row": "Comută rândul de antet",
"delete_table": "Șterge tabelul",
- "pick_size": "Alege dimensiunea"
+ "pick_size": "Alege dimensiunea",
+ "font_size": "Dimensiune font",
+ "font_size_default": "Implicit",
+ "background_color": "Culoarea fundalului",
+ "remove_background_color": "Elimină culoarea fundalului"
},
"send_filing_warning": "Trimis - dar curățarea ulterioară a eșuat, poate rămâne o ciornă veche."
},
diff --git a/locales/ru/common.json b/locales/ru/common.json
index 13814a0cc..6493a1b4a 100644
--- a/locales/ru/common.json
+++ b/locales/ru/common.json
@@ -728,7 +728,11 @@
"delete_column": "Удалить столбец",
"toggle_header_row": "Переключить строку заголовка",
"delete_table": "Удалить таблицу",
- "pick_size": "Выбрать размер"
+ "pick_size": "Выбрать размер",
+ "font_size": "Размер шрифта",
+ "font_size_default": "По умолчанию",
+ "background_color": "Цвет фона",
+ "remove_background_color": "Убрать цвет фона"
},
"send_filing_warning": "Отправлено - но последующая очистка не удалась, может остаться устаревший черновик."
},
diff --git a/locales/sk/common.json b/locales/sk/common.json
index 56f3e76ec..9e13b0b46 100644
--- a/locales/sk/common.json
+++ b/locales/sk/common.json
@@ -728,7 +728,11 @@
"delete_column": "Odstrániť stĺpec",
"toggle_header_row": "Prepnúť riadok záhlavia",
"delete_table": "Odstrániť tabuľku",
- "pick_size": "Vybrať veľkosť"
+ "pick_size": "Vybrať veľkosť",
+ "font_size": "Veľkosť písma",
+ "font_size_default": "Predvolené",
+ "background_color": "Farba pozadia",
+ "remove_background_color": "Odstrániť farbu pozadia"
},
"send_filing_warning": "Odoslané - ale následné upratovanie zlyhalo, môže zostať zastaraný koncept."
},
diff --git a/locales/tr/common.json b/locales/tr/common.json
index 99c5227fd..655cdedfa 100644
--- a/locales/tr/common.json
+++ b/locales/tr/common.json
@@ -728,7 +728,11 @@
"delete_column": "Sütunu sil",
"toggle_header_row": "Başlık satırını aç/kapat",
"delete_table": "Tabloyu sil",
- "pick_size": "Boyut seç"
+ "pick_size": "Boyut seç",
+ "font_size": "Yazı boyutu",
+ "font_size_default": "Varsayılan",
+ "background_color": "Arka plan rengi",
+ "remove_background_color": "Arka plan rengini kaldır"
},
"send_filing_warning": "Gönderildi - ancak sonrasındaki temizleme başarısız oldu, eski bir taslak kalabilir."
},
diff --git a/locales/uk/common.json b/locales/uk/common.json
index 723af5fc2..b64bea073 100644
--- a/locales/uk/common.json
+++ b/locales/uk/common.json
@@ -728,7 +728,11 @@
"delete_column": "Видалити стовпець",
"toggle_header_row": "Переключити рядок заголовка",
"delete_table": "Видалити таблицю",
- "pick_size": "Вибрати розмір"
+ "pick_size": "Вибрати розмір",
+ "font_size": "Розмір шрифту",
+ "font_size_default": "За замовчуванням",
+ "background_color": "Колір фону",
+ "remove_background_color": "Прибрати колір фону"
},
"send_filing_warning": "Надіслано - але подальше очищення не вдалося, може залишитися застаріла чернетка."
},
diff --git a/locales/zh-TW/common.json b/locales/zh-TW/common.json
index 57ca6db0f..cea9bddf4 100644
--- a/locales/zh-TW/common.json
+++ b/locales/zh-TW/common.json
@@ -725,7 +725,11 @@
"delete_column": "刪除欄",
"toggle_header_row": "切換標題列",
"delete_table": "刪除表格",
- "pick_size": "選取大小"
+ "pick_size": "選取大小",
+ "font_size": "字型大小",
+ "font_size_default": "預設",
+ "background_color": "背景顏色",
+ "remove_background_color": "移除背景顏色"
},
"send_filing_warning": "郵件已傳送,但寄送後清理失敗,可能仍保留舊草稿。"
},
diff --git a/locales/zh/common.json b/locales/zh/common.json
index 0d804d91c..78c3391d9 100644
--- a/locales/zh/common.json
+++ b/locales/zh/common.json
@@ -728,7 +728,11 @@
"delete_column": "删除列",
"toggle_header_row": "切换标题行",
"delete_table": "删除表格",
- "pick_size": "选择大小"
+ "pick_size": "选择大小",
+ "font_size": "字号",
+ "font_size_default": "默认",
+ "background_color": "背景颜色",
+ "remove_background_color": "移除背景颜色"
},
"send_filing_warning": "已发送,但发送后的清理失败,可能会残留旧草稿。"
},