2019-06-25 15:47:43 +08:00
|
|
|
import React from 'react';
|
2022-05-25 15:22:43 +08:00
|
|
|
import { MarkdownViewer } from '@seafile/seafile-editor';
|
2020-12-26 17:45:48 +08:00
|
|
|
import { mediaUrl } from '../../utils/constants';
|
2019-06-25 15:47:43 +08:00
|
|
|
|
|
|
|
import '../../css/md-file-view.css';
|
|
|
|
|
|
|
|
const { fileContent } = window.app.pageOptions;
|
|
|
|
|
|
|
|
class FileContent extends React.Component {
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<div className="file-view-content flex-1 o-auto">
|
|
|
|
<div className="md-content">
|
2020-11-02 13:56:35 +08:00
|
|
|
<MarkdownViewer
|
2019-06-25 15:47:43 +08:00
|
|
|
markdownContent={fileContent}
|
|
|
|
showTOC={false}
|
2020-12-26 17:45:48 +08:00
|
|
|
scriptSource={mediaUrl + 'js/mathjax/tex-svg.js'}
|
2019-06-25 15:47:43 +08:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default FileContent;
|