From 7ec91716a719b48807e709a66de7b209b98881a9 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Fri, 20 Jun 2025 16:38:48 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E6=A0=BC=E5=BC=8F=E5=88=B7=E5=9B=BE?= =?UTF-8?q?=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/images/icons/brush-3-line.svg | 1 + .../plugins/FormatPaint/FormatPainterToolbarButton.tsx | 4 +++- src/components/LexicalEditor/plugins/ToolbarPlugin.jsx | 2 +- src/components/LexicalEditor/styles.css | 3 ++- 4 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 public/images/icons/brush-3-line.svg diff --git a/public/images/icons/brush-3-line.svg b/public/images/icons/brush-3-line.svg new file mode 100644 index 0000000..6ba5eb8 --- /dev/null +++ b/public/images/icons/brush-3-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/LexicalEditor/plugins/FormatPaint/FormatPainterToolbarButton.tsx b/src/components/LexicalEditor/plugins/FormatPaint/FormatPainterToolbarButton.tsx index fe3bc07..ac83799 100644 --- a/src/components/LexicalEditor/plugins/FormatPaint/FormatPainterToolbarButton.tsx +++ b/src/components/LexicalEditor/plugins/FormatPaint/FormatPainterToolbarButton.tsx @@ -67,11 +67,13 @@ export function FormatPainterToolbarButton() { onClick={handleClick} onDoubleClick={handleDoubleClick} className={`toolbar-item spaced ${isActive ? 'active' : ''}`} - title={isActive ? (isSticky ? 'Format Painter (Sticky)' : 'Format Painter (Active)') : 'Format Painter'} + // title={isActive ? (isSticky ? 'Format Painter (Sticky)' : 'Format Painter (Active)') : 'Format Painter'} + title={'格式刷'} aria-label={isActive ? (isSticky ? 'Deactivate Format Painter (Sticky)' : 'Deactivate Format Painter (Active)') : 'Activate Format Painter'} disabled={!isActive && !canCopy} > + {/* 格式刷 */} ); } diff --git a/src/components/LexicalEditor/plugins/ToolbarPlugin.jsx b/src/components/LexicalEditor/plugins/ToolbarPlugin.jsx index b74d45f..c9a1cc4 100644 --- a/src/components/LexicalEditor/plugins/ToolbarPlugin.jsx +++ b/src/components/LexicalEditor/plugins/ToolbarPlugin.jsx @@ -857,7 +857,7 @@ export default function ToolbarPlugin() { diff --git a/src/components/LexicalEditor/styles.css b/src/components/LexicalEditor/styles.css index cb13fe9..2fae643 100644 --- a/src/components/LexicalEditor/styles.css +++ b/src/components/LexicalEditor/styles.css @@ -404,6 +404,7 @@ pre::-webkit-scrollbar-thumb { padding: 8px; cursor: pointer; vertical-align: middle; + word-break: keep-all; } .toolbar button.toolbar-item:disabled { @@ -842,7 +843,7 @@ i.outdent { } i.painter { - background-image: url(/images/icons/paint-brush-line.svg); + background-image: url(/images/icons/brush-3-line.svg); } i.bold {