1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-15 05:33:38 +00:00
seahub/frontend/src/shared-file-view-sdoc.js

27 lines
573 B
JavaScript
Raw Normal View History

import React from 'react';
import ReactDom from 'react-dom';
2023-04-18 10:23:03 +00:00
import { SimpleViewer } from '@seafile/sdoc-editor';
2023-04-18 10:23:03 +00:00
const { serviceURL } = window.app.config;
const { repoID, filePath, fileName } = window.shared.pageOptions;
2023-04-18 10:23:03 +00:00
const { rawPath } = window.shared.pageOptions;
2023-04-18 10:23:03 +00:00
window.seafile = {
repoID,
rawPath: rawPath,
docName: fileName, // required
docPath: filePath,
serviceUrl: serviceURL,
};
2023-04-18 10:23:03 +00:00
class ViewFileSdoc extends React.Component {
render() {
2023-04-18 10:23:03 +00:00
return <SimpleViewer />;
}
}
2023-04-18 10:23:03 +00:00
ReactDom.render(<ViewFileSdoc />, document.getElementById('wrapper'));