mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 08:53:14 +00:00
update sdoc module (#5437)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import React from 'react';
|
||||
import { SDocViewer } from '@seafile/sdoc-editor';
|
||||
import { defaultContentForSDoc } from '../../utils/constants';
|
||||
|
||||
import '../../css/sdoc-file-view.css';
|
||||
|
||||
@@ -9,9 +8,10 @@ const { fileContent } = window.app.pageOptions;
|
||||
class FileContent extends React.Component {
|
||||
|
||||
render() {
|
||||
const document = fileContent ? JSON.parse(fileContent) : null;
|
||||
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={{}} />
|
||||
<SDocViewer document={document} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user