Skip to content

Commit 9143a1f

Browse files
feat: 定义基本的kit
1 parent 87f9420 commit 9143a1f

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

apps/kk-adapt-app/src/registry/ui/floating-toolbar-buttons.tsx

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
import * as React from 'react';
44

55
import {
6+
BaselineIcon,
67
BoldIcon,
7-
Code2Icon,
88
ItalicIcon,
9+
PaintBucketIcon,
910
StrikethroughIcon,
1011
UnderlineIcon,
1112
WandSparklesIcon,
@@ -15,7 +16,8 @@ import { useEditorReadOnly } from 'platejs/react';
1516

1617
import { AIToolbarButton } from './ai-toolbar-button';
1718
import { CommentToolbarButton } from './comment-toolbar-button';
18-
import { InlineEquationToolbarButton } from './equation-toolbar-button';
19+
import { FontColorToolbarButton } from './font-color-toolbar-button';
20+
import { FontSizeToolbarButton } from './font-size-toolbar-button';
1921
import { LinkToolbarButton } from './link-toolbar-button';
2022
import { MarkToolbarButton } from './mark-toolbar-button';
2123
import { MoreToolbarButton } from './more-toolbar-button';
@@ -39,7 +41,10 @@ export function FloatingToolbarButtons() {
3941

4042
<ToolbarGroup>
4143
<TurnIntoToolbarButton />
44+
<FontSizeToolbarButton />
45+
</ToolbarGroup>
4246

47+
<ToolbarGroup>
4348
<MarkToolbarButton nodeType={KEYS.bold} tooltip="Bold (⌘+B)">
4449
<BoldIcon />
4550
</MarkToolbarButton>
@@ -62,13 +67,18 @@ export function FloatingToolbarButtons() {
6267
<StrikethroughIcon />
6368
</MarkToolbarButton>
6469

65-
<MarkToolbarButton nodeType={KEYS.code} tooltip="Code (⌘+E)">
66-
<Code2Icon />
67-
</MarkToolbarButton>
70+
<LinkToolbarButton />
6871

69-
<InlineEquationToolbarButton />
72+
<FontColorToolbarButton nodeType={KEYS.color} tooltip="Text color">
73+
<BaselineIcon />
74+
</FontColorToolbarButton>
7075

71-
<LinkToolbarButton />
76+
<FontColorToolbarButton
77+
nodeType={KEYS.backgroundColor}
78+
tooltip="Background color"
79+
>
80+
<PaintBucketIcon />
81+
</FontColorToolbarButton>
7282
</ToolbarGroup>
7383
</>
7484
)}

apps/www/src/registry/components/editor/editor-kit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export const EditorKit = [
7676
...DndKit,
7777
...EmojiKit,
7878
...ExitBreakKit,
79-
TrailingBlockPlugin,
79+
// TrailingBlockPlugin,
8080

8181
// Parsers
8282
...DocxKit,

0 commit comments

Comments
 (0)