1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 15:09:14 +00:00

[sdoc file view] added support for 'internal link' (#5463)

This commit is contained in:
llj
2023-05-09 20:32:29 +08:00
committed by GitHub
parent af0f83c603
commit 525c82f5f1

View File

@@ -3,8 +3,9 @@ import ReactDom from 'react-dom';
import { SimpleEditor } from '@seafile/sdoc-editor';
import { I18nextProvider } from 'react-i18next';
import i18n from './_i18n/i18n-sdoc-editor';
import Loading from './components/loading';
import { Utils } from './utils/utils';
import Loading from './components/loading';
import InternalLinkDialog from './components/dialog/internal-link-dialog';
const { serviceURL, avatarURL, siteRoot } = window.app.config;
const { username, name } = window.app.userInfo;
@@ -28,7 +29,8 @@ window.seafile = {
siteRoot,
docPerm: filePerm,
historyURL: Utils.generateHistoryURL(siteRoot, repoID, docPath),
parentFolderURL: `${siteRoot}library/${repoID}/${Utils.encodePath(repoName + parentDir)}`
parentFolderURL: `${siteRoot}library/${repoID}/${Utils.encodePath(repoName + parentDir)}`,
internalLink: <InternalLinkDialog repoID={repoID} path={docPath} />
};
ReactDom.render(