mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 17:02:47 +00:00
Sdoc (#5434)
* [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
This commit is contained in:
20
frontend/src/components/file-content-view/sdoc.js
Normal file
20
frontend/src/components/file-content-view/sdoc.js
Normal file
@@ -0,0 +1,20 @@
|
||||
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;
|
Reference in New Issue
Block a user