From 6aabed885118802397165d7cc810afd4ace52ba4 Mon Sep 17 00:00:00 2001 From: Phodal Huang Date: Thu, 23 Nov 2023 14:29:11 +0800 Subject: [PATCH] fix: fix examples for title --- .../editor/intelli/menu/menu-bubble.jsx | 75 ++++++++++--------- components/editor/live-editor.jsx | 4 +- 2 files changed, 42 insertions(+), 37 deletions(-) diff --git a/components/editor/intelli/menu/menu-bubble.jsx b/components/editor/intelli/menu/menu-bubble.jsx index 81e6199..3f48edb 100644 --- a/components/editor/intelli/menu/menu-bubble.jsx +++ b/components/editor/intelli/menu/menu-bubble.jsx @@ -9,48 +9,51 @@ export const MenuBubble = ({ editor }) => { const selection = editor.commands.getSelectedText() let selectLength = selection?.length ? selection.length : 0 - // 根据长度优化 return - {selectLength < 64 &&
- -
- } - {selectLength > 64 &&
- + } + {selectLength < 64 && - + >扩写 + } + {selectLength > 64 && <> + + + + }
- }
} \ No newline at end of file diff --git a/components/editor/live-editor.jsx b/components/editor/live-editor.jsx index 6d84b9f..81839af 100644 --- a/components/editor/live-editor.jsx +++ b/components/editor/live-editor.jsx @@ -49,7 +49,7 @@ const extensions = [ ] const content = ` -## 3B editor +# 3B editor Hi there, 3B is editor for Unit Mesh architecture paradigms, the next-gen software architecture. @@ -57,6 +57,8 @@ Hi there, 3B is editor for Unit Mesh architecture paradigms, the next-gen softwa 2. use \`Alt\` + \`/\` or \`Command\` + \`/\` to show custom input box. 3. select text and right click to see the context menu. +## Inline AI + Chinese text for testing grammar and spellings, select long text to see the menu. 永和九年,岁在癸丑,暮春之初,会于会稽山阴之兰亭,修禊事也。群贤毕至,少长咸集。此地有崇山峻岭,茂林修竹;又有清流激湍,映带左右,引以为流觞曲水,