diff --git a/src/components/Editor.vue b/src/components/Editor.vue index 24fea775d4b..6739f3b08bb 100644 --- a/src/components/Editor.vue +++ b/src/components/Editor.vue @@ -76,6 +76,7 @@ import { getCurrentUser } from '@nextcloud/auth' import { loadState } from '@nextcloud/initial-state' import { isPublicShare } from '@nextcloud/sharing/public' import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus' +import { File } from '@nextcloud/files' import { Collaboration } from '@tiptap/extension-collaboration' import Autofocus from '../extensions/Autofocus.js' import { Doc } from 'yjs' @@ -121,6 +122,7 @@ import Wrapper from './Editor/Wrapper.vue' import SkeletonLoading from './SkeletonLoading.vue' import Assistant from './Assistant.vue' import Translate from './Modal/Translate.vue' +import { generateRemoteUrl } from '@nextcloud/router' export default { name: 'Editor', @@ -675,7 +677,13 @@ export default { }, onSave() { - emit('files:file:updated', { fileid: this.fileId }) + const node = new File({ + id: this.fileId, + source: generateRemoteUrl(`dav/files/${this.currentSession.userId}${this.relativePath}`), + mtime: new Date(), + mime: this.mime, + }) + emit('files:node:updated', node) this.$nextTick(() => { this.emit('sync-service:save') })