From dadc08c39aa694a4ae8ea3297dba5c9a30a0876f Mon Sep 17 00:00:00 2001 From: fantasticit Date: Sun, 3 Apr 2022 11:36:45 +0800 Subject: [PATCH] feat:improve katex popup position --- packages/client/src/tiptap/wrappers/katex/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/client/src/tiptap/wrappers/katex/index.tsx b/packages/client/src/tiptap/wrappers/katex/index.tsx index 584ae6ee..4f517756 100644 --- a/packages/client/src/tiptap/wrappers/katex/index.tsx +++ b/packages/client/src/tiptap/wrappers/katex/index.tsx @@ -20,7 +20,7 @@ export const KatexWrapper = ({ editor, node, updateAttributes }) => { } }, [text]); - const content = text ? ( + const content = text.trim() ? ( ) : ( 点击输入公式 @@ -32,10 +32,11 @@ export const KatexWrapper = ({ editor, node, updateAttributes }) => { {isEditable ? (