1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-11 03:41:12 +00:00

shared md & trash snapshot md

This commit is contained in:
杨顺强
2023-12-07 15:14:34 +08:00
parent 551213c429
commit da89c9a338
4 changed files with 35 additions and 72 deletions

View File

@@ -65,13 +65,6 @@ class FileContent extends React.Component {
return Utils.changeMarkdownNodes(value, this.changeImageURL);
};
updateForNoOutline = () => {
const $outline = document.querySelector('.md-view .seafile-markdown-outline');
const $main = document.querySelector('.md-view .article');
$outline.className += ' d-none';
$main.className += ' article-no-outline';
};
render() {
if (err) {
return <SharedFileViewTip />;
@@ -82,20 +75,13 @@ class FileContent extends React.Component {
}
return (
<div className="shared-file-view-body">
<div className="md-view">
<MarkdownViewer
scriptSource={mediaUrl + 'js/mathjax/tex-svg.js'}
markdownContent={this.state.markdownContent}
showTOC={true}
updateForNoOutline={this.updateForNoOutline}
activeTitleIndex={''}
serviceURL={serviceURL}
sharedToken={sharedToken}
repoID={repoID}
modifyValueBeforeRender={this.modifyValueBeforeRender}
/>
</div>
<div className="shared-file-view-body md-view">
<MarkdownViewer
value={this.state.markdownContent}
isShowOutline={true}
mathJaxSource={mediaUrl + 'js/mathjax/tex-svg.js'}
beforeRenderCallback={this.modifyValueBeforeRender}
/>
</div>
);
}