作者 | 日期 |
---|---|
雨中星辰 | 2018-12-20 |
可以為ONLYOFFICE文檔服務(wù)器更改的參數(shù)可以細分為以下主要部分:
config - 允許更改使用的平臺類型,文檔顯示大小(寬度和高度)和打開的文檔類型;
-
document - 包含與文檔有關(guān)的所有參數(shù)(標(biāo)題,URL,文件類型等);
- info - 包含文檔的其他參數(shù)(文檔作者,存儲文檔的文件夾,創(chuàng)建日期,共享設(shè)置);
- permissions - 定義是否可以編輯和下載文檔;
- editorConfig - 定義與編輯器界面有關(guān)的參數(shù):打開模式(查看器或編輯器),界面語言,附加按鈕等);
- events - 是在對文檔應(yīng)用某些操作時(在加載,修改等時)調(diào)用的特殊事件列表。
包含所有其他參數(shù)的完整配置如下所示:
config = {
"document": {
"fileType": "docx",
"info": {
"author": "John Smith",
"created": "2010-07-07 3:46 PM",
"folder": "Example Files",
"sharingSettings": [
{
"permissions": "Full Access",
"user": "John Smith"
},
{
"permissions": "Read Only",
"user": "Kate Cage"
},
...
]
},
"key": "Khirz6zTPdfd7",
"permissions": {
"comment": true,
"download": true,
"edit": true,
"fillForms": true,
"print": true,
"review": true
},
"title": "Example Document Title.docx",
"url": "https://example.com/url-to-example-document.docx"
},
"documentType": "text",
"editorConfig": {
"callbackUrl": "https://example.com/url-to-callback.ashx",
"createUrl": "https://example.com/url-to-create-document/",
"customization": {
"autosave": true,
"chat": true,
"commentAuthorOnly": false,
"compactToolbar": false,
"customer": {
"address": "My City, 123a-45",
"info": "Some additional information",
"logo": "https://example.com/logo-big.png",
"mail": "john@example.com",
"name": "John Smith and Co.",
"www": "example.com"
},
"feedback": {
"url": "https://example.com",
"visible": true
},
"forcesave": false,
"goback": {
"blank": true,
"text": "Go to Documents",
"url": "https://example.com"
},
"help": true,
"logo": {
"image": "https://example.com/logo.png",
"imageEmbedded": "https://example.com/logo_em.png",
"url": "https://example.com"
},
"showReviewChanges": false,
"zoom": 100
},
"embedded": {
"embedUrl": "https://example.com/embedded?doc=exampledocument1.docx",
"fullscreenUrl": "https://example.com/embedded?doc=exampledocument1.docx#fullscreen",
"saveUrl": "https://example.com/download?doc=exampledocument1.docx",
"shareUrl": "https://example.com/view?doc=exampledocument1.docx",
"toolbarDocked": "top"
},
"lang": "en-US",
"mode": "edit",
"plugins": {
"autostart": [
"asc.{0616AE85-5DBE-4B6B-A0A9-455C4F1503AD}",
"asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}",
...
],
"pluginsData": [
"https://example.com/plugin1/config.json",
"https://example.com/plugin2/config.json",
...
]
},
"recent": [
{
"folder": "Example Files",
"title": "exampledocument1.docx",
"url": "https://example.com/exampledocument1.docx"
},
{
"folder": "Example Files",
"title": "exampledocument2.docx",
"url": "https://example.com/exampledocument2.docx"
},
...
],
"user": {
"id": "78e1e841",
"name": "John Smith"
}
},
"events": {
"onAppReady": onAppReady,
"onCollaborativeChanges": onCollaborativeChanges,
"onDocumentReady": onDocumentReady,
"onDocumentStateChange": onDocumentStateChange,
"onDownloadAs": onDownloadAs,
"onError": onError,
"onRequestClose": onRequestClose,
"onRequestEditRights": onRequestEditRights,
"onRequestHistory": onRequestHistory,
"onRequestHistoryClose": onRequestHistoryClose,
"onRequestHistoryData": onRequestHistoryData,
"onWarning": onWarning
},
"height": "100%",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.t-IDcSemACt8x4iTMCda8Yhe3iZaWbvV5XKSTbuAn0M",
"type": "desktop",
"width": "100%"
};
其中example.com是安裝文檔管理器和文檔存儲服務(wù)的服務(wù)器的名稱。請參閱“ 工作原理”部分以了解有關(guān)文件服務(wù)器服務(wù)客戶端 - 服務(wù)器交互的更多信息。
onlyoffice中文指南 目錄
【onlyoffice中文指南】0-基本概念
【onlyoffice中文指南】1-onlyoffice的工作原理
【onlyoffice中文指南】2-打開文件
【onlyoffice中文指南】3-保存文件
【onlyoffice中文指南】4-協(xié)同編輯
【onlyoffice中文指南】5-轉(zhuǎn)換和下載文件
【onlyoffice中文指南】6-文檔歷史
【onlyoffice中文指南】7-安全
【onlyoffice中文指南】8-高級參數(shù)
【onlyoffice中文指南】9-回調(diào)處理程序
【onlyoffice中文指南】10-Document配置
【onlyoffice中文指南】11-編輯器(Editor)參數(shù)配置
【onlyoffice中文指南】12-問題及排除
本文翻譯自官方文檔