11import { TextSelection } from '@tiptap/pm/state' ;
22import { BubbleMenu } from '@tiptap/react/menus' ;
33
4- import { useEditorInstance } from '@/store/editor ' ;
4+ import { Separator } from '@/components/ui ' ;
55import { RichTextBold } from '@/extensions/Bold' ;
6- import { RichTextItalic } from '@/extensions/Italic' ;
7- import { RichTextUnderline } from '@/extensions/TextUnderline' ;
8- import { RichTextStrike } from '@/extensions/Strike' ;
96import { RichTextCode } from '@/extensions/Code' ;
10- import { RichTextLink } from '@/extensions/Link' ;
117import { RichTextColor } from '@/extensions/Color' ;
128import { RichTextHighlight } from '@/extensions/Highlight' ;
9+ import { RichTextItalic } from '@/extensions/Italic' ;
10+ import { RichTextLink } from '@/extensions/Link' ;
11+ import { RichTextStrike } from '@/extensions/Strike' ;
1312import { RichTextAlign } from '@/extensions/TextAlign' ;
14- import { Separator } from '@/components/ui' ;
13+ import { RichTextUnderline } from '@/extensions/TextUnderline' ;
14+ import { useEditorInstance } from '@/store/editor' ;
1515import { useEditableEditor } from '@/store/store' ;
1616
1717interface RichTextBubbleTextProps {
@@ -31,21 +31,25 @@ interface RichTextBubbleTextProps {
3131// ];
3232
3333function DefaultButtonBubble ( ) {
34- return < >
34+ return (
35+ < >
3536 < RichTextBold />
3637 < RichTextItalic />
3738 < RichTextUnderline />
3839 < RichTextUnderline />
3940 < RichTextStrike />
4041 < RichTextCode />
4142 < RichTextLink />
43+
4244 < Separator className = "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]"
4345 orientation = "vertical"
4446 />
47+
4548 < RichTextColor />
4649 < RichTextHighlight />
4750 < RichTextAlign />
48- </ > ;
51+ </ >
52+ ) ;
4953}
5054
5155export function RichTextBubbleText ( { buttonBubble } : RichTextBubbleTextProps ) {
@@ -70,14 +74,14 @@ export function RichTextBubbleText({ buttonBubble }: RichTextBubbleTextProps) {
7074
7175 return (
7276 < BubbleMenu editor = { editor }
73- shouldShow = { shouldShow }
7477 options = { { placement : 'bottom' , offset : 8 , flip : true } }
78+ shouldShow = { shouldShow }
7579 >
7680 { buttonBubble
7781 ? (
7882 < >
7983{ buttonBubble }
80- </ >
84+ </ >
8185 )
8286 : (
8387 < div className = "richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800" >
0 commit comments