From f1560eafa5d4970d34b07aabd878596d8a56f550 Mon Sep 17 00:00:00 2001 From: ramblingpm Date: Sun, 23 Nov 2025 17:22:49 +0100 Subject: [PATCH] Add Line break button --- src/components/shared/rich-editor/RichEditor.tsx | 7 +++++++ src/i18n/locales/en.json | 1 + src/i18n/locales/zh.json | 1 + 3 files changed, 9 insertions(+) diff --git a/src/components/shared/rich-editor/RichEditor.tsx b/src/components/shared/rich-editor/RichEditor.tsx index 3a5e6b8b..7fee58d2 100644 --- a/src/components/shared/rich-editor/RichEditor.tsx +++ b/src/components/shared/rich-editor/RichEditor.tsx @@ -23,6 +23,7 @@ import { AlignJustify, List, ListOrdered, + CornerDownLeft, Undo, Redo, PaintBucket, @@ -465,6 +466,12 @@ const RichTextEditor = ({ > + editor.chain().focus().setHardBreak().run()} + tooltip={t("lineBreak")} + > + +
diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 3bbcc257..fb4ca909 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -465,6 +465,7 @@ "alignJustify": "Justify", "bulletList": "Bullet List", "orderedList": "Ordered List", + "lineBreak": "Line Break (Shift+Enter)", "undo": "Undo", "redo": "Redo", "aiPolish": "AI Polish", diff --git a/src/i18n/locales/zh.json b/src/i18n/locales/zh.json index 9afd2bdd..e2373f21 100644 --- a/src/i18n/locales/zh.json +++ b/src/i18n/locales/zh.json @@ -436,6 +436,7 @@ "alignJustify": "两端对齐", "bulletList": "无序列表", "orderedList": "有序列表", + "lineBreak": "换行 (Shift+Enter)", "undo": "撤销", "redo": "重做", "aiPolish": "AI 润色",