@tiptap/vue-2 3.5.0 → 3.5.2

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.
@@ -1996,6 +1996,10 @@ var BubbleMenu2 = {
1996
1996
  resizeDelay: {
1997
1997
  type: Number
1998
1998
  },
1999
+ appendTo: {
2000
+ type: Object,
2001
+ default: void 0
2002
+ },
1999
2003
  shouldShow: {
2000
2004
  type: Function,
2001
2005
  default: null
@@ -2021,6 +2025,7 @@ var BubbleMenu2 = {
2021
2025
  editor,
2022
2026
  element: this.$el,
2023
2027
  pluginKey: this.pluginKey,
2028
+ appendTo: this.appendTo,
2024
2029
  shouldShow: this.shouldShow,
2025
2030
  getReferencedVirtualElement: this.getReferencedVirtualElement
2026
2031
  })
@@ -2042,7 +2047,7 @@ var import_core4 = require("@tiptap/core");
2042
2047
  var import_core5 = require("@tiptap/core");
2043
2048
  var import_state2 = require("@tiptap/pm/state");
2044
2049
  var FloatingMenuView = class {
2045
- constructor({ editor, element, view, options, shouldShow }) {
2050
+ constructor({ editor, element, view, options, appendTo, shouldShow }) {
2046
2051
  this.preventHide = false;
2047
2052
  this.isVisible = false;
2048
2053
  this.shouldShow = ({ view: view2, state }) => {
@@ -2104,6 +2109,7 @@ var FloatingMenuView = class {
2104
2109
  this.editor = editor;
2105
2110
  this.element = element;
2106
2111
  this.view = view;
2112
+ this.appendTo = appendTo;
2107
2113
  this.floatingUIOptions = {
2108
2114
  ...this.floatingUIOptions,
2109
2115
  ...options
@@ -2205,13 +2211,13 @@ var FloatingMenuView = class {
2205
2211
  this.updateHandler(view, selectionChanged, docChanged, oldState);
2206
2212
  }
2207
2213
  show() {
2208
- var _a;
2214
+ var _a, _b;
2209
2215
  if (this.isVisible) {
2210
2216
  return;
2211
2217
  }
2212
2218
  this.element.style.visibility = "visible";
2213
2219
  this.element.style.opacity = "1";
2214
- (_a = this.view.dom.parentElement) == null ? void 0 : _a.appendChild(this.element);
2220
+ (_b = (_a = this.appendTo) != null ? _a : this.view.dom.parentElement) == null ? void 0 : _b.appendChild(this.element);
2215
2221
  if (this.floatingUIOptions.onShow) {
2216
2222
  this.floatingUIOptions.onShow();
2217
2223
  }
@@ -2252,6 +2258,7 @@ var FloatingMenu = import_core4.Extension.create({
2252
2258
  element: null,
2253
2259
  options: {},
2254
2260
  pluginKey: "floatingMenu",
2261
+ appendTo: void 0,
2255
2262
  shouldShow: null
2256
2263
  };
2257
2264
  },
@@ -2265,6 +2272,7 @@ var FloatingMenu = import_core4.Extension.create({
2265
2272
  editor: this.editor,
2266
2273
  element: this.options.element,
2267
2274
  options: this.options.options,
2275
+ appendTo: this.options.appendTo,
2268
2276
  shouldShow: this.options.shouldShow
2269
2277
  })
2270
2278
  ];
@@ -2287,6 +2295,10 @@ var FloatingMenu2 = {
2287
2295
  type: Object,
2288
2296
  default: () => ({})
2289
2297
  },
2298
+ appendTo: {
2299
+ type: Object,
2300
+ default: void 0
2301
+ },
2290
2302
  shouldShow: {
2291
2303
  type: Function,
2292
2304
  default: null
@@ -2310,6 +2322,7 @@ var FloatingMenu2 = {
2310
2322
  editor,
2311
2323
  element: this.$el,
2312
2324
  options: this.options,
2325
+ appendTo: this.appendTo,
2313
2326
  shouldShow: this.shouldShow
2314
2327
  })
2315
2328
  );