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
path: root/src
diff options
context:
space:
mode:
authorJulien Veyssier <eneiluj@posteo.net>2022-04-01 12:08:39 +0300
committernextcloud-command <nextcloud-command@users.noreply.github.com>2022-04-06 11:20:07 +0300
commit865cd8baaba3dc986d59500039731b3449278544 (patch)
treefc998d47d3c3151c9358602206220b2ffc2d77fc /src
parentf7ebb71e7d9542c6ce715ca6068958af3f8299e0 (diff)
fix file links, generate and open internal link if possible
Signed-off-by: Julien Veyssier <eneiluj@posteo.net> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r--src/marks/Link.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/marks/Link.js b/src/marks/Link.js
index e41048240..c754cee4b 100644
--- a/src/marks/Link.js
+++ b/src/marks/Link.js
@@ -20,6 +20,7 @@
*
*/
+import { generateUrl } from '@nextcloud/router'
import TipTapLink from '@tiptap/extension-link'
import { Plugin } from 'prosemirror-state'
import { domHref, parseHref } from './../helpers/links'
@@ -81,6 +82,11 @@ const Link = TipTapLink.extend({
OCA.Viewer.open({ path })
return
}
+ if (query.fileId) {
+ // open the direct file link
+ window.open(generateUrl(`/f/${query.fileId}`))
+ return
+ }
}
if (!markdownit.validateLink(htmlHref)) {