@tiptap/vue-2 3.0.0-next.3 → 3.0.0-next.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,12 +2,12 @@ import { BubbleMenuPlugin, BubbleMenuPluginProps } from '@tiptap/extension-bubbl
2
2
  import Vue, { Component, CreateElement, PropType } from 'vue'
3
3
 
4
4
  export interface BubbleMenuInterface extends Vue {
5
- pluginKey: BubbleMenuPluginProps['pluginKey'],
6
- editor: BubbleMenuPluginProps['editor'],
7
- updateDelay: BubbleMenuPluginProps['updateDelay'],
8
- resizeDelay: BubbleMenuPluginProps['resizeDelay'],
9
- shouldShow: BubbleMenuPluginProps['shouldShow'],
10
- options: BubbleMenuPluginProps['options'],
5
+ pluginKey: BubbleMenuPluginProps['pluginKey']
6
+ editor: BubbleMenuPluginProps['editor']
7
+ updateDelay: BubbleMenuPluginProps['updateDelay']
8
+ resizeDelay: BubbleMenuPluginProps['resizeDelay']
9
+ shouldShow: BubbleMenuPluginProps['shouldShow']
10
+ options: BubbleMenuPluginProps['options']
11
11
  }
12
12
 
13
13
  export const BubbleMenu: Component = {
@@ -51,21 +51,23 @@ export const BubbleMenu: Component = {
51
51
  return
52
52
  }
53
53
 
54
- (this.$el as HTMLElement).style.visibility = 'hidden';
55
- (this.$el as HTMLElement).style.position = 'absolute'
54
+ ;(this.$el as HTMLElement).style.visibility = 'hidden'
55
+ ;(this.$el as HTMLElement).style.position = 'absolute'
56
56
 
57
57
  this.$el.remove()
58
58
 
59
59
  this.$nextTick(() => {
60
- editor.registerPlugin(BubbleMenuPlugin({
61
- updateDelay: this.updateDelay,
62
- resizeDelay: this.resizeDelay,
63
- options: this.options,
64
- editor,
65
- element: this.$el as HTMLElement,
66
- pluginKey: this.pluginKey,
67
- shouldShow: this.shouldShow,
68
- }))
60
+ editor.registerPlugin(
61
+ BubbleMenuPlugin({
62
+ updateDelay: this.updateDelay,
63
+ resizeDelay: this.resizeDelay,
64
+ options: this.options,
65
+ editor,
66
+ element: this.$el as HTMLElement,
67
+ pluginKey: this.pluginKey,
68
+ shouldShow: this.shouldShow,
69
+ }),
70
+ )
69
71
  })
70
72
  },
71
73
  },
@@ -2,10 +2,10 @@ import { FloatingMenuPlugin, FloatingMenuPluginProps } from '@tiptap/extension-f
2
2
  import Vue, { Component, CreateElement, PropType } from 'vue'
3
3
 
4
4
  export interface FloatingMenuInterface extends Vue {
5
- pluginKey: FloatingMenuPluginProps['pluginKey'],
6
- options: FloatingMenuPluginProps['options'],
7
- editor: FloatingMenuPluginProps['editor'],
8
- shouldShow: FloatingMenuPluginProps['shouldShow'],
5
+ pluginKey: FloatingMenuPluginProps['pluginKey']
6
+ options: FloatingMenuPluginProps['options']
7
+ editor: FloatingMenuPluginProps['editor']
8
+ shouldShow: FloatingMenuPluginProps['shouldShow']
9
9
  }
10
10
 
11
11
  export const FloatingMenu: Component = {
@@ -41,19 +41,21 @@ export const FloatingMenu: Component = {
41
41
  return
42
42
  }
43
43
 
44
- (this.$el as HTMLElement).style.visibility = 'hidden';
45
- (this.$el as HTMLElement).style.position = 'absolute'
44
+ ;(this.$el as HTMLElement).style.visibility = 'hidden'
45
+ ;(this.$el as HTMLElement).style.position = 'absolute'
46
46
 
47
47
  this.$el.remove()
48
48
 
49
49
  this.$nextTick(() => {
50
- editor.registerPlugin(FloatingMenuPlugin({
51
- pluginKey: this.pluginKey,
52
- editor,
53
- element: this.$el as HTMLElement,
54
- options: this.options,
55
- shouldShow: this.shouldShow,
56
- }))
50
+ editor.registerPlugin(
51
+ FloatingMenuPlugin({
52
+ pluginKey: this.pluginKey,
53
+ editor,
54
+ element: this.$el as HTMLElement,
55
+ options: this.options,
56
+ shouldShow: this.shouldShow,
57
+ }),
58
+ )
57
59
  })
58
60
  },
59
61
  },
@@ -0,0 +1,2 @@
1
+ export * from './BubbleMenu.js'
2
+ export * from './FloatingMenu.js'