Load OnlyOffice documents in the inner iframe

This commit is contained in:
yflory
2018-03-26 18:32:40 +02:00
parent 714c46fc2e
commit 34f2d66b7e
14 changed files with 94 additions and 248 deletions

View File

@@ -1,25 +0,0 @@
/* globals DocsAPI */
window.config = {
"document": {
"fileType": "pptx",
"key": "Khirz6zTPdfd7",
"title": "test.pptx",
"url": "/onlyoffice/test.pptx"
},
"documentType": "presentation",
"editorConfig": {
"user": {
"id": "c0c3bf82-20d7-4663-bf6d-7fa39c598b1d",
"name": "John Smith"
}
},
"events": {
"onDocumentStateChange": function (/* evt */) { console.log("in change"); },
"onReady": function (/* evt */) { console.log("in onReady"); }
}
};
window.onbeforeunload = null;
window.docEditor = new DocsAPI.DocEditor("placeholder", window.config);

View File

@@ -1,14 +0,0 @@
<html>
<head>
<style>
body {
margin: 0;
}
</style>
</head>
<body>
<div id="placeholder"></div>
<script type="text/javascript" src="/common/onlyoffice/web-apps/apps/api/documents/api.js"></script>
<script type="text/javascript" src="doc.js"></script>
</body>
</html>

View File

@@ -2,7 +2,7 @@
<html class="cp-app-noscroll">
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<script async data-bootload="/common/onlyoffice/inner.js" data-main="/common/sframe-boot.js?ver=1.4" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<script async data-bootload="/common/onlyoffice/inner.js" data-main="/common/sframe-boot.js?ver=1.6" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<style>
.loading-hidden { display: none; }
</style>
@@ -10,8 +10,8 @@
<body class="cp-app-ooslide">
<div id="cp-toolbar" class="cp-toolbar-container"></div>
<div id="cp-app-oo-container">
<iframe id="ooframe" src="document.html" width="100%" height="100%">
</iframe>
<div id="cp-app-oo-placeholder"></div>
<script type="text/javascript" src="/common/onlyoffice/web-apps/apps/api/documents/api.js"></script>
</div>
</body>

File diff suppressed because one or more lines are too long