admin管理员组文章数量:1122846
I have onlyoffice/documentserver launched with Docker. Here's my docker-compose.yml
file:
services:
# ... definition of other services
onlyoffice:
image: onlyoffice/documentserver
restart: always
ports:
- 80:80
I'm trying to add a DocEditor to my webpage, here's html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DocEditor</title>
<script type="text/javascript" src="http://localhost:80/web-apps/apps/api/documents/api.js"></script>
<script>
console.log("log 1");
const docEditor = new DocsAPI.DocEditor("placeholder", {
documentType: "word",
document: {
fileType: "docx",
title: "document.docx",
url: "http://localhost:8000/document.docx",
},
editorConfig: {
debug: true,
mode: "edit",
width: "100vw",
height: "100vh",
onError: function (error) {
console.error(error);
},
onDocumentReady: function () {
console.log("Document Ready");
}
}
});
console.log("log 2");
</script>
</head>
<body>
<div id="placeholder"></div>
</body>
</html>
Both http://localhost:80/web-apps/apps/api/documents/api.js
and http://localhost:8000/document.docx
are accessible; I can easily open them in a browser
But there is no DocEditor on a webpage, moreover, there are no logs in the console (only "log 1"
and "log 2"
). So what am I doing wrong?
本文标签: How to create a DocEditor with onlyofficedocumentserver running on DockerStack Overflow
版权声明:本文标题:How to create a DocEditor with onlyofficedocumentserver running on Docker? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736300360a1930787.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论