From a07aad555e39eeb303872c85a5142ef9cb0cc002 Mon Sep 17 00:00:00 2001 From: zzxming <74341337+zzxming@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:30:19 +0800 Subject: [PATCH] fix: toolbar-tip text doesn't display (#187) --- packages/fluent-editor/src/toolbar/toolbar-tip.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/fluent-editor/src/toolbar/toolbar-tip.ts b/packages/fluent-editor/src/toolbar/toolbar-tip.ts index de710ac..9a5441e 100644 --- a/packages/fluent-editor/src/toolbar/toolbar-tip.ts +++ b/packages/fluent-editor/src/toolbar/toolbar-tip.ts @@ -54,7 +54,7 @@ export function generateToolbarTip(QuillToolbarTip: Constructor) { 'lineheight', ].reduce((map, name) => { map[name] = { - onShow() { + onShow: () => { return this.quill.getLangText(name) }, } @@ -69,7 +69,7 @@ export function generateToolbarTip(QuillToolbarTip: Constructor) { 'direction', ].reduce((map, name) => { map[name] = { - onShow(target: HTMLElement, value: string) { + onShow: (target: HTMLElement, value: string) => { if (name === 'direction') { value = target.classList.contains('ql-active') ? 'rtl' : 'ltr' }