一個 word在線編輯組件,可以替換
docker pull hub.c.163.com/gongzh/onlyoffice:latest
docker run -i -t -d -p 8702:80 hub.c.163.com/gongzh/onlyoffice
訪問地址
http://192.168.3.211:8702/welcome/
測試頁面 aa.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="http://192.168.3.211:8702/web-apps/apps/api/documents/api.js"></script>
</style>
</head>
<body>
<div id="placeholder" class = "nav"></div>
<script language="javascript" type="text/javascript">
new DocsAPI.DocEditor("placeholder", {
"document": {
"fileType": "docx",
"key": "12NAFE",
"title": "test6.docx",
"url": "http://192.168.3.212:9006/quick/front/1.docx"
},
"documentType": "text",
"width": "1600px",
"height": "900px",
"editorConfig": {
"callbackUrl": "http://192.168.3.212:9006/quick/back/save"
},
"permissions": {
"comment": true,
"download": true,
"edit": true,
"fillForms": true,
"print": true,
"review": true
}
});
</script>
</body>
</html>