From ee00a3b3dfa78df86959081418ea7e373880cc48 Mon Sep 17 00:00:00 2001 From: Alina Beck Date: Fri, 23 Aug 2019 15:49:20 +0100 Subject: [PATCH] replace floating and bubble menu with menu bar --- webapp/components/Editor/Editor.vue | 138 +-------------------- webapp/components/Editor/MenuBar.vue | 78 ++++++++++++ webapp/components/Editor/MenuBarButton.vue | 16 +++ 3 files changed, 98 insertions(+), 134 deletions(-) create mode 100644 webapp/components/Editor/MenuBar.vue create mode 100644 webapp/components/Editor/MenuBarButton.vue diff --git a/webapp/components/Editor/Editor.vue b/webapp/components/Editor/Editor.vue index 7791facb6..c0bf3da43 100644 --- a/webapp/components/Editor/Editor.vue +++ b/webapp/components/Editor/Editor.vue @@ -43,137 +43,7 @@ - - - @@ -184,20 +54,20 @@ import linkify from 'linkify-it' import stringHash from 'string-hash' import Fuse from 'fuse.js' import tippy from 'tippy.js' -import { Editor, EditorContent, EditorFloatingMenu, EditorMenuBubble } from 'tiptap' +import { Editor, EditorContent } from 'tiptap' import EventHandler from './plugins/eventHandler.js' import { History } from 'tiptap-extensions' import Hashtag from './nodes/Hashtag.js' import Mention from './nodes/Mention.js' import { mapGetters } from 'vuex' +import HcMenuBar from './MenuBar' let throttleInputEvent export default { components: { EditorContent, - EditorFloatingMenu, - EditorMenuBubble, + HcMenuBar, }, props: { users: { type: Array, default: () => null }, // If 'null', than the Mention extention is not assigned. diff --git a/webapp/components/Editor/MenuBar.vue b/webapp/components/Editor/MenuBar.vue new file mode 100644 index 000000000..8156eee9e --- /dev/null +++ b/webapp/components/Editor/MenuBar.vue @@ -0,0 +1,78 @@ + + + diff --git a/webapp/components/Editor/MenuBarButton.vue b/webapp/components/Editor/MenuBarButton.vue new file mode 100644 index 000000000..28eae6583 --- /dev/null +++ b/webapp/components/Editor/MenuBarButton.vue @@ -0,0 +1,16 @@ + + +