From c728282147a1c376630902fbe7bf0d3f3d3b5cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Wed, 8 Jan 2020 02:23:05 +0100 Subject: Add basic autocompletion of mentions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The vue-at component is used to provide the autocompletion UI. This component handles the edition in its wrapped contenteditable, so the "vue-contenteditable-directive" is no longer needed. As the new message form hides its overflowing children (and it can not be removed, as it breaks the layout when typing long (tall) messages) the "vue-at-reparenter" helper is used. In this initial version the candidate mentions show the id of the user or guest that matches the current "@" mention being written and, when selected, adds that id as plain text to the editable content. Signed-off-by: Daniel Calviño Sánchez --- src/main.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/main.js') diff --git a/src/main.js b/src/main.js index 7230aebf5..f3756d7fa 100644 --- a/src/main.js +++ b/src/main.js @@ -38,7 +38,6 @@ import { generateFilePath } from '@nextcloud/router' import { getRequestToken } from '@nextcloud/auth' // Directives -import contenteditableDirective from 'vue-contenteditable-directive' import VueClipboard from 'vue-clipboard2' import { translate, translatePlural } from '@nextcloud/l10n' import VueObserveVisibility from 'vue-observe-visibility' @@ -60,7 +59,6 @@ Vue.prototype.n = translatePlural Vue.prototype.OC = OC Vue.prototype.OCA = OCA -Vue.use(contenteditableDirective) Vue.use(Vuex) Vue.use(VueRouter) Vue.use(VueClipboard) -- cgit v1.2.3