From 7437992dd57a6659475efee6d4c24326a52656f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Mon, 22 Oct 2018 21:40:12 +0200 Subject: [PATCH] fix some examples --- examples/Components/Routes/Basic/index.vue | 3 + examples/Components/Routes/Embeds/index.vue | 52 ++++----- .../Components/Routes/HidingMenuBar/index.vue | 101 ++++++++++++------ .../Components/Routes/MenuBubble/index.vue | 3 + packages/tiptap/src/Components/MenuBar.js | 2 + packages/tiptap/src/Components/MenuBubble.js | 2 + 6 files changed, 104 insertions(+), 59 deletions(-) diff --git a/examples/Components/Routes/Basic/index.vue b/examples/Components/Routes/Basic/index.vue index 0d29f23b..09030237 100644 --- a/examples/Components/Routes/Basic/index.vue +++ b/examples/Components/Routes/Basic/index.vue @@ -188,5 +188,8 @@ export default { }), } }, + beforeDestroy() { + this.editor.destroy() + }, } \ No newline at end of file diff --git a/examples/Components/Routes/Embeds/index.vue b/examples/Components/Routes/Embeds/index.vue index b48dad87..9cdcd641 100644 --- a/examples/Components/Routes/Embeds/index.vue +++ b/examples/Components/Routes/Embeds/index.vue @@ -1,23 +1,11 @@ diff --git a/examples/Components/Routes/HidingMenuBar/index.vue b/examples/Components/Routes/HidingMenuBar/index.vue index 056f8b9e..c42eacef 100644 --- a/examples/Components/Routes/HidingMenuBar/index.vue +++ b/examples/Components/Routes/HidingMenuBar/index.vue @@ -1,9 +1,8 @@ \ No newline at end of file diff --git a/examples/Components/Routes/MenuBubble/index.vue b/examples/Components/Routes/MenuBubble/index.vue index 1cb0942e..6c1efda7 100644 --- a/examples/Components/Routes/MenuBubble/index.vue +++ b/examples/Components/Routes/MenuBubble/index.vue @@ -94,5 +94,8 @@ export default { }), } }, + beforeDestroy() { + this.editor.destroy() + }, } \ No newline at end of file diff --git a/packages/tiptap/src/Components/MenuBar.js b/packages/tiptap/src/Components/MenuBar.js index 6a6dd9b3..5291d7e8 100644 --- a/packages/tiptap/src/Components/MenuBar.js +++ b/packages/tiptap/src/Components/MenuBar.js @@ -10,6 +10,8 @@ export default { return createElement('div', this.$scopedSlots.default({ nodes: this.editor.menuActions.nodes, marks: this.editor.menuActions.marks, + focused: this.editor.view.focused, + focus: this.editor.focus, })) } }, diff --git a/packages/tiptap/src/Components/MenuBubble.js b/packages/tiptap/src/Components/MenuBubble.js index 1899f4f1..661ada80 100644 --- a/packages/tiptap/src/Components/MenuBubble.js +++ b/packages/tiptap/src/Components/MenuBubble.js @@ -24,6 +24,8 @@ export default { return createElement('div', this.$scopedSlots.default({ nodes: this.editor.menuActions.nodes, marks: this.editor.menuActions.marks, + focused: this.editor.view.focused, + focus: this.editor.focus, })) } },