@@ -85,13 +85,18 @@ import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'
8585import { File } from ' @nextcloud/files'
8686import { Collaboration } from ' @tiptap/extension-collaboration'
8787import { useElementSize } from ' @vueuse/core'
88- import { defineComponent , ref , shallowRef , watch } from ' vue'
88+ import { defineComponent , inject , ref , shallowRef , watch } from ' vue'
8989import { Doc } from ' yjs'
9090import Autofocus from ' ../extensions/Autofocus.js'
9191
9292import { provideEditor } from ' ../composables/useEditor.ts'
9393import { provideEditorFlags } from ' ../composables/useEditorFlags.ts'
94- import { ATTACHMENT_RESOLVER , FILE , IS_MOBILE } from ' ./Editor.provider.ts'
94+ import {
95+ ATTACHMENT_RESOLVER ,
96+ HOOK_MENTION_SEARCH ,
97+ FILE ,
98+ IS_MOBILE ,
99+ } from ' ./Editor.provider.ts'
95100import ReadonlyBar from ' ./Menu/ReadonlyBar.vue'
96101
97102import { generateRemoteUrl } from ' @nextcloud/router'
@@ -239,12 +244,14 @@ export default defineComponent({
239244 Collaboration .configure ({ document : ydoc }),
240245 CollaborationCaret .configure ({ provider: { awareness } }),
241246 ]
247+ const mentionSearch = inject (HOOK_MENTION_SEARCH )
242248 const editor = isRichEditor
243249 ? createRichEditor ({
244250 connection,
245251 relativePath: props .relativePath ,
246252 extensions,
247253 isEmbedded: props .isEmbedded ,
254+ mentionSearch,
248255 })
249256 : createPlainEditor ({ language, extensions })
250257 provideEditor (editor)
0 commit comments