feat: add tippyOptions prop

This commit is contained in:
Philipp Kühn
2021-04-16 12:42:56 +02:00
parent 398fc7f210
commit 9a56f666a1
10 changed files with 56 additions and 12 deletions

View File

@@ -9,6 +9,11 @@ export const BubbleMenu = Vue.extend({
type: Object as PropType<BubbleMenuPluginProps['editor']>,
required: true,
},
tippyOptions: {
type: Object as PropType<BubbleMenuPluginProps['tippyOptions']>,
default: () => ({}),
},
},
watch: {
@@ -23,6 +28,7 @@ export const BubbleMenu = Vue.extend({
editor.registerPlugin(BubbleMenuPlugin({
editor,
element: this.$el as HTMLElement,
tippyOptions: this.tippyOptions,
}))
})
},

View File

@@ -9,6 +9,11 @@ export const FloatingMenu = Vue.extend({
type: Object as PropType<FloatingMenuPluginProps['editor']>,
required: true,
},
tippyOptions: {
type: Object as PropType<FloatingMenuPluginProps['tippyOptions']>,
default: () => ({}),
},
},
watch: {
@@ -23,6 +28,7 @@ export const FloatingMenu = Vue.extend({
editor.registerPlugin(FloatingMenuPlugin({
editor,
element: this.$el as HTMLElement,
tippyOptions: this.tippyOptions,
}))
})
},