1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 17:02:47 +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
This commit is contained in:
llj
2023-04-17 15:32:52 +08:00
committed by GitHub
parent 101c5e85fb
commit 7ab352db18
16 changed files with 702 additions and 79 deletions

View 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;