ONLYOFFICE 文档服务器可以更改的参数可以细分为以下主要部分:
config - 允许更改使用的平台类型、文档显示大小(宽度和高度)和打开文档的类型;包含所有附加参数的完整 config 如下所示:
config = { "document": { "fileType": "docx", "info": { "favorite": true, "folder": "Example Files", "owner": "John Smith", "sharingSettings": [ { "permissions": "Full Access", "user": "John Smith" }, { "isLink": true, "permissions": "Read Only", "user": "External link" }, ... ], "uploaded": "2010-07-07 3:46 PM" }, "key": "Khirz6zTPdfd7", "permissions": { "chat": true, "comment": true, "commentGroups": [ "edit": ["Group2", ""], "remove": [""], "view": "" ], "copy": true, "deleteCommentAuthorOnly": false, "download": true, "edit": true, "editCommentAuthorOnly": false, "fillForms": true, "modifyContentControl": true, "modifyFilter": true, "print": true, "protect": true, "review": true, "reviewGroups": ["Group1", "Group2", ""], "userInfoGroups": ["Group1", ""] }, "referenceData": { "fileKey": "BCFA2CED", "instanceId": "https://example.com", "key": "Khirz6zTPdfd7" }, "title": "Example Document Title.docx", "url": "https://example.com/url-to-example-document.docx" }, "documentType": "word", "editorConfig": { "actionLink": ACTION_DATA, "callbackUrl": "https://example.com/url-to-callback.ashx", "coEditing": { "mode": "fast", "change": true }, "createUrl": "https://example.com/url-to-create-document/", "customization": { "anonymous": { "request": true, "label": "Guest" }, "autosave": true, "comments": true, "compactHeader": false, "compactToolbar": false, "compatibleFeatures": false, "customer": { "address": "My City, 123a-45", "info": "Some additional information", "logo": "https://example.com/logo-big.png", "logoDark": "https://example.com/dark-logo-big.png", "mail": "john@example.com", "name": "John Smith and Co.", "phone": "123456789", "www": "example.com" }, "features": { "spellcheck": { "mode": true, "change": true } }, "feedback": { "url": "https://example.com", "visible": true }, "forcesave": false, "goback": { "blank": true, "requestClose": false, "text": "Open file location", "url": "https://example.com" }, "help": true, "hideNotes": false, "hideRightMenu": false, "hideRulers": false, "integrationMode": "embed", "logo": { "image": "https://example.com/logo.png", "imageDark": "https://example.com/dark-logo.png", "url": "https://example.com" }, "macros": true, "macrosMode": "warn", "mentionShare": true, "mobileForceView": true, "plugins": true, "review": { "hideReviewDisplay": false, "showReviewChanges": false, "reviewDisplay": "original", "trackChanges": true, "hoverMode": false }, "submitForm": true, "toolbarHideFileName": false, "toolbarNoTabs": false, "uiTheme": "theme-dark", "unit": "cm", "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", "location": "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" }, ... ], "region": "en-US", "templates": [ { "image": "https://example.com/exampletemplate1.png", "title": "exampletemplate1.docx", "url": "https://example.com/url-to-create-template1" }, { "image": "https://example.com/exampletemplate2.png", "title": "exampletemplate2.docx", "url": "https://example.com/url-to-create-template2" }, ... ], "user": { "group": "Group1", "id": "78e1e841", "image": "https://example.com/url-to-user-avatar.png", "name": "John Smith" } }, "events": { "onAppReady": onAppReady, "onCollaborativeChanges": onCollaborativeChanges, "onDocumentReady": onDocumentReady, "onDocumentStateChange": onDocumentStateChange, "onDownloadAs": onDownloadAs, "onError": onError, "onInfo": onInfo, "onMetaChange": onMetaChange, "onOutdatedVersion": onOutdatedVersion, "onPluginsReady": onPluginsReady, "onRequestClose": onRequestClose, "onRequestCreateNew": onRequestCreateNew, "onRequestEditRights": onRequestEditRights, "onRequestHistory": onRequestHistory, "onRequestHistoryClose": onRequestHistoryClose, "onRequestHistoryData": onRequestHistoryData, "onRequestInsertImage": onRequestInsertImage, "onRequestMailMergeRecipients": onRequestMailMergeRecipients, "onRequestOpen": onRequestOpen, "onRequestReferenceData": onRequestReferenceData, "onRequestReferenceSource": onRequestReferenceSource, "onRequestRename": onRequestRename, "onRequestRestore": onRequestRestore, "onRequestSaveAs": onRequestSaveAs, "onRequestSelectDocument": onRequestSelectDocument, "onRequestSelectSpreadsheet": onRequestSelectSpreadsheet, "onRequestSendNotify": onRequestSendNotify, "onRequestSharingSettings": onRequestSaveAs, "onRequestUsers": onRequestUsers, "onWarning": onWarning }, "height": "100%", "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.LwimMJA3puF3ioGeS-tfczR3370GXBZMIL-bdpu4hOU", "type": "desktop", "width": "100%" };
其中 example.com 是安装了 文档管理器 和 文档存储服务 的服务器的名称。 有关文档服务器服务客户机-服务器交互的更多信息,请参阅 它是如何运作的 部分。