mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 08:53:14 +00:00
* [sdoc file view] added file view, history/trash file view for 'sdoc' * [sdoc file view] sdoc-editor: upgraded it to the latest version(0.1.5) - sdoc file view: enable 'auto save' - sdoc shared/history/trash file view: use the read-only sdoc viewer * [sdoc file view] fixup
21 lines
559 B
JavaScript
21 lines
559 B
JavaScript
import React from 'react';
|
|
import { SDocViewer } from '@seafile/sdoc-editor';
|
|
import { defaultContentForSDoc } from '../../utils/constants';
|
|
|
|
import '../../css/sdoc-file-view.css';
|
|
|
|
const { fileContent } = window.app.pageOptions;
|
|
|
|
class FileContent extends React.Component {
|
|
|
|
render() {
|
|
return (
|
|
<div className="file-view-content flex-1 o-auto sdoc-file-view p-0 d-flex flex-column">
|
|
<SDocViewer document={fileContent ? JSON.parse(fileContent) : defaultContentForSDoc} config={{}} />
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default FileContent;
|