onlyOffice

【onlyoffice中文指南】8-高级参数

2018-12-19  本文已影响0人  雨中星辰0
作者 日期
雨中星辰 2018-12-20

可以为ONLYOFFICE文档服务器更改的参数可以细分为以下主要部分:

config - 允许更改使用的平台类型,文档显示大小(宽度和高度)和打开的文档类型;

包含所有其他参数的完整配置如下所示:

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是安装文档管理器文档存储服务的服务器的名称。请参阅“ 工作原理”部分以了解有关文件服务器服务客户端 - 服务器交互的更多信息。

onlyoffice中文指南 目录

【onlyoffice中文指南】0-基本概念
【onlyoffice中文指南】1-onlyoffice的工作原理
【onlyoffice中文指南】2-打开文件
【onlyoffice中文指南】3-保存文件
【onlyoffice中文指南】4-协同编辑
【onlyoffice中文指南】5-转换和下载文件
【onlyoffice中文指南】6-文档历史
【onlyoffice中文指南】7-安全
【onlyoffice中文指南】8-高级参数
【onlyoffice中文指南】9-回调处理程序
【onlyoffice中文指南】10-Document配置
【onlyoffice中文指南】11-编辑器(Editor)参数配置
【onlyoffice中文指南】12-问题及排除

本文翻译自官方文档

上一篇 下一篇

猜你喜欢

热点阅读