Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/EditorWrapper.vue')
-rw-r--r--src/components/EditorWrapper.vue13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/components/EditorWrapper.vue b/src/components/EditorWrapper.vue
index 3b63558f9..c75d6897b 100644
--- a/src/components/EditorWrapper.vue
+++ b/src/components/EditorWrapper.vue
@@ -94,10 +94,12 @@ import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'
import { EditorContent } from '@tiptap/vue-2'
import { getVersion, receiveTransaction } from 'prosemirror-collab'
import { Step } from 'prosemirror-transform'
+import { getCurrentUser } from '@nextcloud/auth'
import {
EDITOR,
FILE,
+ IMAGE_RESOLVER,
IS_MOBILE,
IS_PUBLIC,
IS_RICH_EDITOR,
@@ -106,6 +108,7 @@ import {
} from './EditorWrapper.provider.js'
import { SyncService, ERROR_TYPE, IDLE_TIMEOUT } from './../services/SyncService.js'
+import ImageResolver from './../services/ImageResolver.js'
import { getRandomGuestName } from './../helpers/index.js'
import { extensionHighlight } from '../helpers/mappings.js'
import { createEditor, serializePlainText, loadSyntaxHighlight } from './../EditorFactory.js'
@@ -158,6 +161,9 @@ export default {
[FILE]: {
get: () => this.fileData,
},
+ [IMAGE_RESOLVER]: {
+ get: () => this.$imageResolver,
+ },
[IS_PUBLIC]: {
get: () => this.isPublic,
},
@@ -335,6 +341,7 @@ export default {
created() {
this.$editor = null
this.$syncService = null
+ this.$imageResolver = null
this.saveStatusPolling = setInterval(() => {
this.updateLastSavedStatus()
}, 2000)
@@ -483,6 +490,12 @@ export default {
this.lock = this.$syncService.lock
localStorage.setItem('nick', this.currentSession.guestName)
this.$store.dispatch('setCurrentSession', this.currentSession)
+ this.$imageResolver = new ImageResolver({
+ session: this.currentSession,
+ user: getCurrentUser(),
+ shareToken: this.shareToken,
+ currentDirectory: this.relativePath,
+ })
},
onLoaded({ documentSource }) {