forked from yikoyu/vuetify-pro-tiptap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstrike.ts
More file actions
23 lines (19 loc) · 677 Bytes
/
Copy pathstrike.ts
File metadata and controls
23 lines (19 loc) · 677 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 { StrikeOptions as TiptapStrikeOptions } from '@tiptap/extension-strike'
import type { GeneralOptions } from '@/type'
import { Strike as TiptapStrike } from '@tiptap/extension-strike'
import { StrikeActionButton } from './components/ActionButton'
export interface StrikeOptions extends TiptapStrikeOptions, GeneralOptions<StrikeOptions> {}
export const Strike = /* @__PURE__ */ TiptapStrike.extend<StrikeOptions>({
addOptions() {
return {
...this.parent?.() as TiptapStrikeOptions,
button: ({ editor, t }) => ({
component: StrikeActionButton,
componentProps: {
editor,
t,
},
}),
}
},
})