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