2023-04-17 07:32:52 +00:00
|
|
|
import React from 'react';
|
|
|
|
import ReactDom from 'react-dom';
|
2023-04-18 10:23:03 +00:00
|
|
|
import { SimpleEditor } from '@seafile/sdoc-editor';
|
2023-04-17 07:32:52 +00:00
|
|
|
|
2023-04-18 10:23:03 +00:00
|
|
|
const { serviceURL } = window.app.config;
|
|
|
|
const { repoID, docPath, docName, docUuid, seadocAccessToken, seadocServerUrl } = window.app.pageOptions;
|
2023-04-17 07:32:52 +00:00
|
|
|
|
2023-04-18 10:23:03 +00:00
|
|
|
window.seafile = {
|
|
|
|
repoID,
|
2023-04-17 07:32:52 +00:00
|
|
|
docPath,
|
|
|
|
docName,
|
|
|
|
docUuid,
|
2023-04-18 10:23:03 +00:00
|
|
|
isOpenSocket: true,
|
|
|
|
serviceUrl: serviceURL,
|
|
|
|
accessToken: seadocAccessToken,
|
|
|
|
sdocServer: seadocServerUrl,
|
2023-04-17 07:32:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class ViewFileSdoc extends React.Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
2023-04-18 10:23:03 +00:00
|
|
|
return (<SimpleEditor />);
|
2023-04-17 07:32:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ReactDom.render(<ViewFileSdoc />, document.getElementById('wrapper'));
|