@tiptap/vue-2 3.10.6 → 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.
@@ -2004,37 +2004,30 @@ var BubbleMenu2 = {
2004
2004
  default: null
2005
2005
  }
2006
2006
  },
2007
- watch: {
2008
- editor: {
2009
- immediate: true,
2010
- handler(editor) {
2011
- if (!editor) {
2012
- return;
2013
- }
2014
- if (!this.$el) {
2015
- return;
2016
- }
2017
- ;
2018
- this.$el.style.visibility = "hidden";
2019
- this.$el.style.position = "absolute";
2020
- this.$el.remove();
2021
- this.$nextTick(() => {
2022
- editor.registerPlugin(
2023
- BubbleMenuPlugin({
2024
- updateDelay: this.updateDelay,
2025
- resizeDelay: this.resizeDelay,
2026
- options: this.options,
2027
- editor,
2028
- element: this.$el,
2029
- pluginKey: this.pluginKey,
2030
- appendTo: this.appendTo,
2031
- shouldShow: this.shouldShow,
2032
- getReferencedVirtualElement: this.getReferencedVirtualElement
2033
- })
2034
- );
2035
- });
2036
- }
2007
+ mounted() {
2008
+ const editor = this.editor;
2009
+ const el = this.$el;
2010
+ if (!editor || !el) {
2011
+ return;
2037
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
+ });
2038
2031
  },
2039
2032
  render(createElement) {
2040
2033
  return createElement("div", {}, this.$slots.default);