File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ import { getCurrentUser } from '@nextcloud/auth'
7575import { loadState } from ' @nextcloud/initial-state'
7676import { isPublicShare } from ' @nextcloud/sharing/public'
7777import { emit , subscribe , unsubscribe } from ' @nextcloud/event-bus'
78+ import { File } from ' @nextcloud/files'
7879import { Collaboration } from ' @tiptap/extension-collaboration'
7980import Autofocus from ' ../extensions/Autofocus.js'
8081import { Doc } from ' yjs'
@@ -114,6 +115,7 @@ import Wrapper from './Editor/Wrapper.vue'
114115import SkeletonLoading from ' ./SkeletonLoading.vue'
115116import Assistant from ' ./Assistant.vue'
116117import Translate from ' ./Modal/Translate.vue'
118+ import { generateRemoteUrl } from ' @nextcloud/router'
117119
118120export default {
119121 name: ' Editor' ,
@@ -650,7 +652,14 @@ export default {
650652 },
651653
652654 onSave () {
653- emit (' files:file:updated' , { fileid: this .fileId })
655+ const user = getCurrentUser ()
656+ const node = new File ({
657+ id: this .fileId ,
658+ source: generateRemoteUrl (` dav/files/${ user .uid }${ this .relativePath } ` ),
659+ mtime: new Date (),
660+ mime: ' text/markdown' ,
661+ })
662+ emit (' files:node:updated' , node)
654663 this .$nextTick (() => {
655664 this .emit (' sync-service:save' )
656665 })
You can’t perform that action at this time.
0 commit comments