forked from yikoyu/vuetify-pro-tiptap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunderline.ts
More file actions
23 lines (19 loc) · 722 Bytes
/
Copy pathunderline.ts
File metadata and controls
23 lines (19 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import type { UnderlineOptions as TiptapUnderlineOptions } from '@tiptap/extension-underline'
import type { GeneralOptions } from '@/type'
import { Underline as TiptapUnderline } from '@tiptap/extension-underline'
import { UnderlineActionButton } from './components/ActionButton'
export interface UnderlineOptions extends TiptapUnderlineOptions, GeneralOptions<UnderlineOptions> {}
export const Underline = /* @__PURE__ */ TiptapUnderline.extend<UnderlineOptions>({
addOptions() {
return {
...this.parent?.() as TiptapUnderlineOptions,
button: ({ editor, t }) => ({
component: UnderlineActionButton,
componentProps: {
editor,
t,
},
}),
}
},
})