@tiptap/vue-2 3.10.5 → 3.10.7
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.
- package/dist/menus/index.cjs +27 -28
- package/dist/menus/index.cjs.map +1 -1
- package/dist/menus/index.d.cts +7 -2
- package/dist/menus/index.d.ts +7 -2
- package/dist/menus/index.js +27 -28
- package/dist/menus/index.js.map +1 -1
- package/package.json +7 -7
- package/src/menus/BubbleMenu.ts +35 -34
- package/src/menus/FloatingMenu.ts +4 -0
package/dist/menus/index.cjs
CHANGED
|
@@ -1990,7 +1990,7 @@ var BubbleMenu2 = {
|
|
|
1990
1990
|
},
|
|
1991
1991
|
options: {
|
|
1992
1992
|
type: Object,
|
|
1993
|
-
default: {}
|
|
1993
|
+
default: () => ({})
|
|
1994
1994
|
},
|
|
1995
1995
|
resizeDelay: {
|
|
1996
1996
|
type: Number
|
|
@@ -2004,34 +2004,30 @@ var BubbleMenu2 = {
|
|
|
2004
2004
|
default: null
|
|
2005
2005
|
}
|
|
2006
2006
|
},
|
|
2007
|
-
|
|
2008
|
-
editor
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
return;
|
|
2013
|
-
}
|
|
2014
|
-
;
|
|
2015
|
-
this.$el.style.visibility = "hidden";
|
|
2016
|
-
this.$el.style.position = "absolute";
|
|
2017
|
-
this.$el.remove();
|
|
2018
|
-
this.$nextTick(() => {
|
|
2019
|
-
editor.registerPlugin(
|
|
2020
|
-
BubbleMenuPlugin({
|
|
2021
|
-
updateDelay: this.updateDelay,
|
|
2022
|
-
resizeDelay: this.resizeDelay,
|
|
2023
|
-
options: this.options,
|
|
2024
|
-
editor,
|
|
2025
|
-
element: this.$el,
|
|
2026
|
-
pluginKey: this.pluginKey,
|
|
2027
|
-
appendTo: this.appendTo,
|
|
2028
|
-
shouldShow: this.shouldShow,
|
|
2029
|
-
getReferencedVirtualElement: this.getReferencedVirtualElement
|
|
2030
|
-
})
|
|
2031
|
-
);
|
|
2032
|
-
});
|
|
2033
|
-
}
|
|
2007
|
+
mounted() {
|
|
2008
|
+
const editor = this.editor;
|
|
2009
|
+
const el = this.$el;
|
|
2010
|
+
if (!editor || !el) {
|
|
2011
|
+
return;
|
|
2034
2012
|
}
|
|
2013
|
+
el.style.visibility = "hidden";
|
|
2014
|
+
el.style.position = "absolute";
|
|
2015
|
+
el.remove();
|
|
2016
|
+
this.$nextTick(() => {
|
|
2017
|
+
editor.registerPlugin(
|
|
2018
|
+
BubbleMenuPlugin({
|
|
2019
|
+
updateDelay: this.updateDelay,
|
|
2020
|
+
resizeDelay: this.resizeDelay,
|
|
2021
|
+
options: this.options,
|
|
2022
|
+
editor,
|
|
2023
|
+
element: el,
|
|
2024
|
+
pluginKey: this.pluginKey,
|
|
2025
|
+
appendTo: this.appendTo,
|
|
2026
|
+
shouldShow: this.shouldShow,
|
|
2027
|
+
getReferencedVirtualElement: this.getReferencedVirtualElement
|
|
2028
|
+
})
|
|
2029
|
+
);
|
|
2030
|
+
});
|
|
2035
2031
|
},
|
|
2036
2032
|
render(createElement) {
|
|
2037
2033
|
return createElement("div", {}, this.$slots.default);
|
|
@@ -2312,6 +2308,9 @@ var FloatingMenu2 = {
|
|
|
2312
2308
|
if (!editor) {
|
|
2313
2309
|
return;
|
|
2314
2310
|
}
|
|
2311
|
+
if (!this.$el) {
|
|
2312
|
+
return;
|
|
2313
|
+
}
|
|
2315
2314
|
;
|
|
2316
2315
|
this.$el.style.visibility = "hidden";
|
|
2317
2316
|
this.$el.style.position = "absolute";
|