变更日志
ONLYOFFICE 文档 API 的更改列表。
版本 10.0
重大变更
- 文档命令服务、文档转换服务和文档生成服务不再接受编辑器配置中的令牌。这些请求的令牌可以包含可选的
operation字段(command、converter或docbuilder),而对于新的 /converter/from-file 和 /docbuilder/from-file 端点,该字段为必填项。这些检查由新增的services.CoAuthoring.token.purposeCheck服务器设置控制,默认值为validate。将其设置为off可关闭这些检查。 - WOPI 主机现在必须通过 IP 过滤器规则明确允许。仅有
*规则已不足以打开文档。将wopi.requireIpFilterRule服务器设置设为false,可取消必须有明确允许规则的要求。 runtime.json文件不再能够更改日志配置,日志级别除外。- 移除了已弃用的
editorConfig.customization.reviewDisplay、editorConfig.customization.showReviewChanges和editorConfig.customization.trackChanges参数。请改用 editorConfig.customization.review 参数中的对应字段。 - 如果密钥(包括租户的密钥)为空或未设置,ONLYOFFICE 文档现在会拒绝该令牌,而不再对其进行验证或签名。
其他变更
- WOPI 发现中新增 interactivepreview 操作,用于打开文档的只读预览,例如在 SharePoint 详细信息窗格中。
- 新增对 ofd 格式的打开支持。与
xps相同,该格式仅支持查看,可转换为其他格式,但不支持编辑或保存为该格式。 - 新增从所有电子表格格式到 xls 格式的转换。
- 新增 /converter/from-file 和 /docbuilder/from-file 端点,以
multipart/form-data格式直接在请求中接收要转换的文件或脚本,而无需通过 URL 下载。 - 在商业版本中,管理面板现默认随服务器自动启动。社区版不包含管理面板。
- 第一个管理员现通过主机命令行工具
documentserver-admin(create-admin、reset-admin-password)创建,不再通过网页使用日志中的引导代码创建。管理员登录名固定为admin。 - 新增 editorConfig.customization.ai 部分及其
disabled参数,用于关闭编辑器中的 AI 功能。 - 新增
aiSettings.enable服务器设置,用于关闭 AI 功能。如果设置为false,则/plugins.json中不包含 AI 工具,并拒绝发往/ai-proxy的请求。 - 另存为普通 PDF 的表单在提交时现在也会被签名,而不仅限于另存为 OFORM PDF 的表单。
default.json中现已启用令牌,默认密钥由secret改为占位符developer-only-not-a-real-secret。此更改不影响安装包:安装时仍会启用令牌并生成各自的密钥。在仍使用该占位符时,启动时会记录一条警告。- 发往
callbackUrl地址的传出请求以及文件下载请求的令牌现在包含 operation 字段,其值为callback或download。如果此类令牌出现在传入请求中,ONLYOFFICE 文档将拒绝该请求。 - 服务器关闭前未保存的更改现在会在关闭过程中恢复为被遗忘文件。独立的
changes2forgotten脚本已移除。 - 新增
services.CoAuthoring.server.convertServiceEnable和services.CoAuthoring.server.docbuilderEnable服务器设置,用于关闭公共转换 API 和文档生成器 API。为保持兼容,两者默认均为true。 - 新增
coauth.connectionsStatsD 指标,带有mode(edit、liveview、view)和replica标签。对于分片集群,总数为各副本之和。 - 下载的文件现在会根据集成商发送的完整性响应头(例如
Content-Digest、Repr-Digest、x-amz-checksum-*或 WOPI SHA256 哈希)进行校验。此功能由services.CoAuthoring.requestDefaults.checksumVerification服务器设置控制,默认为true。 - 传出请求默认的
User-Agent请求头现在为DocumentServer,不再是Node.js/6.13。该值由services.CoAuthoring.requestDefaults.headers.User-Agent服务器设置指定。
版本 9.4
- 新增插件命令日志功能,用于在浏览器控制台中启用插件命令的调试输出。
- 添加了 editorConfig.plugins.disable 参数,用于在加载时阻止指定插件。
- 在支持的界面语言列表中添加了克罗地亚语(
hr)。 - 移除了已弃用的
editorConfig.customization.commentAuthorOnly字段。 - 为 onStartFilling 事件添加了
roles参数,包含角色和用户信息。 - 修复了 destroyEditor 方法中的内存泄漏问题,该问题导致无法完全释放内存。
版本 9.1
- 如果文档无法在 WOPI 中被锁定,则文档将以查看器模式打开并显示错误消息。
- 在
CheckFileInfoWOPI 操作中添加了 UserCanOnlyComment 属性。 - editorConfig.customization.uitheme 参数现已可用于移动编辑器。
- 新增对 hml 格式的打开支持。
- 为
Connector类添加了 sendEvent 方法。 - 新增从 pptx 格式到
txt的转换。 - 将 editorConfig.customization.logo.image 的尺寸要求更改为 300x20。
版本 9.0
- 添加了 editorConfig.customization.suggestFeature 参数。
- 更改了 editorConfig.customization.macros:在 9.0.3 版本中,此参数将完全禁用运行、添加和编辑宏(而不仅仅是自动启动)。
- editorConfig.customization.toolbarHideFileName 参数现已可用于移动编辑器。
- 在 editorConfig.customization.uiTheme 参数中新增
theme-white和theme-night主题 ID。 - 新增对 odg 格式的打开支持。
- 新增对 md 格式的打开支持。
- 新增预加载编辑器静态资源的能力。
- 针对简体中文界面,新增 editorConfig.customization.forceWesternFontSize 参数。
- 新增 editorConfig.customization.layout.header.user 参数。
- 新增对 vsdm、vsdx、vssm、vssx、vstm、vstx 格式的转换能力。
- 在文档类型参数中新增
diagram文档类型。
版本 8.3
- 添加了 editorConfig.customization.features.featuresTips 参数。
- 添加了 editorConfig.customization.showHorizontalScroll 和 editorConfig.customization.showVerticalScroll 参数。
- 添加了 editorConfig.customization.slidePlayerBackground 参数。
- 添加了 editorConfig.customization.wordHeadingsColor 参数。
- 添加了 editorConfig.customization.mobile.info 参数。
- 添加了 pages, key, numbers, hwp, hwpx 格式的打开方式。
- 添加了 events.onUserActionRequired 事件。
- 添加了 refreshFile 方法。
- 添加了 events.onRequestRefreshFile 事件。
- 添加了 requestRoles 方法。
- 为 startFilling 方法添加了
disconnect参数。 - 添加了 events.onStartFilling 事件。
- 为 events.onRequestStartFilling 事件添加了
roles参数。 - 添加了 events.onRequestFillingStatus 事件。
- 添加了 editorConfig.customization.startFillingForm 参数。
- 为 editorConfig.user 添加了
roles字段。 - 添加了 editorConfig.customization.mobile.disableForceDesktop 参数。
- 如果未为 drop 命令指定
users参数,则将禁止所有使用指定key编辑文档的用户编辑文档。 - editorConfig.customization.submitForm 参数现在可以用作对象。
- editorConfig.customization.compactToolbar 参数现在可用于查看器。
- 添加了 editorConfig.customization.pointerMode 参数。
- editorConfig.customization.layout.toolbar.insert 参数现在可以用作带有 file 和 field 字段的对象。
- editorConfig.customization.layout.toolbar.layout 参数现在可以用作带有 pagecolor 字段的对象。
版本 8.2
- 参数 editorConfig.customization.mobileForceView 已弃用,请改用 editorConfig.customization.mobile 参数。
- 在 WOPI conversion API 中新增
Password和PasswordToOpen请求参数。 - editorConfig.region 字段现用于定义所有编辑器类型的默认度量单位。
- editorConfig.location 字段已弃用,请改用 editorConfig.region 字段。
- 在 setRequestedDocument 方法的
c参数中新增insert-text类型的文档选择。 - 命令服务地址
https://documentserver/coauthoring/CommandService.ashx已替换为https://documentserver/command。 - 在 info 命令的响应中新增
users参数。 - 在
editorConfig.customization.features参数中新增 tabBackground 字段。 - 在
editorConfig.customization.features参数中新增 tabStyle 字段。 - 在
editorConfig.customization.logo参数中新增 imageLight 字段。 - editorConfig.customization.toolbarNoTabs 字段已弃用,请改用 editorConfig.customization.features.tabStyle 和 editorConfig.customization.features.tabBackground 字段。
版本 8.1
- 新增 editorConfig.plugins.options 参数。
- 新增支持将
tif/tiff图像类型插入文件。 - 添加了 startFilling 方法。
- 添加了 events.onRequestStartFilling 事件。
- 向 WOPI 主机页面的
form元素添加了 docs_api_config 参数。 - 向转换请求添加了 pdf 字段。
- 添加了 events.onSubmit 事件。
- 添加了 events.onSaveDocument 事件。
- 将
roles字段添加到 editorConfig.customization.features 参数。 - 发送时将 shardkey 参数添加到 URL 查询字符串请求到文档命令服务、文档转换服务或文档生成器服务。
- 向 Automation API 添加了 addContextMenuItem、addToolbarMenuItem 和 updateContextMenuItem 方法。
- 向 Conversion API 添加了 -10 错误代码。
- editorConfig.customization.logo 参数现在可用于移动编辑器。
- 向 editorConfig.customization.logo 参数添加了
visible字段。 - 向 WOPI 发现添加了 formsubmit 操作。
- editorConfig.customization.goback.requestClose 字段已弃用,请使用 editorConfig.customization.close 字段。
- 向 WOPI 添加了 Save Copy As 功能。
- 将 editorConfig.customization.hideRightMenu 参数的默认值更改为
true。
版本 8.0
- 添加了 document.isForm 参数。
- 在浏览器向服务器的请求中添加了 WOPISrc 查询参数。
- 向转化请求添加了 watermark 字段。
- 在 documentType 参数中添加了
pdf文档类型。 - 在回调处理程序中新增 formsdataurl 参数。
- 向 events.onRequestUsers 事件添加了
data.id参数。 - 将
users.image字段添加到 setUsers 方法中。 - 在 setUsers 方法和 events.onRequestUsers 事件中新增
info操作类型。 - 在 editorConfig.user 参数中添加了
image字段。 - 添加了 editorConfig.customization.mobileForceView 参数。
- 将
link字段添加到data对象,该对象发送到 events.onRequestReferenceData 事件。
版本 7.5
- 为回调处理程序的 forcesavetype 参数添加了类型
3。 - 添加了 editorConfig.customization.submitForm 参数。
- events.onRequestMailMergeRecipients 事件已弃用,请使用 events.onRequestSelectSpreadsheet 事件。
- setMailMergeRecipients 方法已弃用,请使用 setRequestedSpreadsheet 方法。
- 添加了 setReferenceSource 方法。
- 添加了 events.onRequestReferenceSource 事件。
- 向 Conversion API 添加了 -9 error code -9 错误代码。
- 在 setReferenceData 参数中添加了
key字段。 - events.onRequestCompareFile 事件已弃用,请使用 events.onRequestSelectDocument 事件。
- setRevisedFile 方法已弃用,请使用 setRequestedDocument 方法。
- 添加了 events.onRequestOpen 事件。
- 添加了 deleteForgotten、 getForgotten 和 getForgottenList 命令。
版本 7.4
- 在 WOPI discovery 中新增 mobileView 和 mobileEdit 操作。
- 添加了打开 dps、dpt、et、ett、mhtml、stw、sxc、sxi、sxw、wps、wpt 格式的功能。
- 在 setUsers 方法中添加了
users.id字段。 - 在 setUsers 方法和 events.onRequestUsers 事件中添加了
c参数。
版本 7.3
- 添加了 WOPI 转换 API。
- 添加了 setReferenceData 方法。
- 添加了 events.onRequestReferenceData 事件。
- 添加了 document.referenceData 参数。
- 向
CheckFileInfoWOPI 操作添加了 UserCanNotWriteRelative 属性。 - 添加了编辑二进制文档格式的方案。
- 向 WOPI 发现添加了 convert 操作。
- 添加了 PutRelativeFile WOPI 操作。
版本 7.2
- 添加了 title 参数。
- 添加了 editorConfig.customization.integrationMode 参数。
- 添加了 Connector 类,以与外部的文本文档、电子表格、演示文稿和可填写表单进行交互。
- 将
theme-contrast-dark主题 id 添加到 editorConfig.customization.uiTheme 参数中。 - 将
phone字段添加到 editorConfig.customization.customer 参数中。 - 向许可证响应添加 connections_view、users_view_count 和 users_view。
- 在文本文档、电子表格和演示文稿编辑器中添加了实时查看器模式。
- 将 embedview 操作添加到 wopi 发现中。
- services.CoAuthoring.secret.browser.string 参数已弃用,请改用 services.CoAuthoring.secret.inbox.string 参数。
版本 7.1
- 用于启用正文中令牌的
services.CoAuthoring.token.inbox.inBody和services.CoAuthoring.token.outbox.inBody参数已经弃用。 - 在 PutFile WOPI 操作中添加了
X-LOOL-WOPI-IsModifiedByUser、X-LOOL-WOPI-IsAutosave和X-LOOL-WOPI-IsExitSave请求标头,以区分文档保存的类型。 - editorConfig.customization.chat 参数已弃用,请改用 document.permissions.chat 参数。
- 添加了从 dps、dpt、et、ett、htm、mhtml、stw、sxc、sxi、sxw、wps、wpt、xlsb、xml 格式转换的功能。
- 添加了打开 xlsb 格式的功能。
- 初始化配置 signature 中的参数列表已得到严格规范。
- editorConfig.customization.spellcheck 字段已弃用,请改用 editorConfig.customization.features.spellcheck 字段。
- 添加了 editorConfig.customization.features 参数部分。
- 在转换请求中添加了 documentLayout 参数。
- 在转换请求中添加了 documentRenderer 参数。
- 添加了从 pdf/xps/oxps 格式到
docx的转换。 - 添加了 document.permissions.userInfoGroups 参数。
- 添加了从 djvu 格式到
pdf的转换。 - 添加了对 ppsm、ppsx 格式的转换。
版本 7.0
- 使用来自同一用户的最后一个标签的 callbackUrl。
- 在 editorConfig.customization.customer 参数中添加了
logoDark字段。 - 在 editorConfig.customization.logo 参数中添加了
imageDark字段。 - editorConfig.customization.logo 参数的
imageEmbedded字段已弃用,请改用image字段。 - 为 setHistoryData 方法的
changesUrl参数指定的文件更改请求添加了签名。 - 添加了 document.permissions.protect 字段。
- 在 onDownloadAs、onRequestRestore 和 onRequestSaveAs 事件中添加了
fileType参数。 - 添加了通过 insertImage 方法插入多个图像的可能性。
- assemblyFormatAsOrigin 服务器设置默认启用。
- 在转换请求的 outputtype 参数中添加了
ooxml和odf值。 - 向 setHistoryData 方法添加了
fileType和previous.fileType参数。 - 将 filetype 参数添加到回调处理程序。
- 在转换响应中添加了 fileType 字段。
- 添加了到 docm, dotm, xlsm, xltm, pptm, potm 格式的转换。
editorConfig.customization.reviewDisplay、editorConfig.customization.showReviewChanges、editorConfig.customization.trackChanges参数已弃用,请改用 editorConfig.customization.review 参数。- 添加了 editorConfig.customization.review.hideReviewDisplay 字段。
- 添加了 editorConfig.customization.review.hoverMode 字段。
- 添加了查看电子表格文件的文档历史记录的可能性。
- 为 PostMessage WOPI 协议添加了 UI_InsertGraphic 消息。
版本 6.4
- 增加了打开 oxps 格式的功能。
- 增加了对 WOPI 协议的支持。
- 添加了 editorConfig.wopi 部分。
- 将
simple值添加到editorConfig.customization.reviewDisplay参数中。 - 添加了保存在电子表格文件中的 threaded comments 线程评论。
- 添加了 editorConfig.customization.uiTheme 字段。
- 添加了查看演示文件的文档历史记录的可能性。
- 添加了 editorConfig.customization.hideNotes 字段。
- 添加了 editorConfig.coEditing 字段。
- 添加了 requestClose 方法。
- 添加了 document.permissions.commentGroups 字段。
- 添加了 events.onPluginsReady 事件。
版本 6.3
- 添加了 license 命令。
- 添加了 editorConfig.customization.hideRulers 字段。
- 添加了 editorConfig.customization.anonymous 字段。
editorConfig.customization.commentAuthorOnly字段已弃用,请使用 document.permissions.editCommentAuthorOnly 和 document.permissions.deleteCommentAuthorOnly 字段。- 添加了 setFavorite 方法。
- 将
data.favorite参数添加到 events.onMetaChange 事件。 - 添加了 document.info.favorite 字段。
- 添加了 document.permissions.reviewGroups 字段。
- 添加了转换为 epub, fb2, html 格式的功能。
- 添加了从 xml 格式转换的功能。
- 移除了已弃用的
document.info.author参数。 - 移除了已弃用的
document.info.created参数。
版本 6.2
- 添加了一个新的 actions.type 字段值(
actions.type = 2)。 - 添加了
editorConfig.customization.trackChanges字段。 - 添加了 editorConfig.customization.toolbarHideFileName 字段。
- 根据 forcesavetype 选择
status6的callbackUrl。 - 增加了打开 fb2 格式的功能。
版本 6.1
- documentType 参数的
text、spreadsheet和presentation值已弃用,请改用word、cell和slide值。 - 将
group字段添加到 editorConfig.user。 - 添加了 editorConfig.customization.reviewPermissions 参数。
- 添加了从 fb2 格式的转换的功能。
- 移除了已弃用的
document.permissions.changeHistory参数。 - 移除了已弃用的
document.permissions.rename参数。
版本 6.0
- 在 events.onRequestInsertImage 事件中添加了插入类型。
- 添加了 editorConfig.templates 字段。
- 添加了 editorConfig.customization.plugins 字段。
- 添加了 editorConfig.customization.macros 字段。
- 添加了 editorConfig.customization.macrosMode 字段。
- 添加了 events.onRequestCreateNew 事件。
- 添加了 document.permissions.copy 字段。
- The
document.permissions.rename字段已弃用,请添加 events.onRequestRename 字段。
版本 5.5
- 转换服务地址
https://documentserver/ConvertService.ashx已替换为https://documentserver/converter。 - 添加了 editorConfig.customization.spellcheck 字段。
- 添加了转换到 pdfa 格式的功能。
- 添加了 events.onRequestCompareFile 事件。
- 添加了 setRevisedFile 方法。
- methods 参数中的 Token。
document.permissions.changeHistory字段已弃用,请添加 events.onRequestRestore 字段。- 添加了 editorConfig.customization.goback.requestClose 字段。
- 添加了 events.onRequestSharingSettings 事件。
- 添加了 editorConfig.customization.unit 字段。
- 添加了 region 字段。
- 添加了转换的 spreadsheetLayout 字段。
- 添加了转换的输入错误。
- events.onRequestSendNotify 事件和 events.onRequestUsers 事件可以独立设置。
- 添加了 editorConfig.customization.mentionShare 字段。
- status 选择
callbackUrl>。 - 添加了 editorConfig.customization.compatibleFeatures 字段。
版本 5.4
- 添加了 editorConfig.region 字段。
document.info.created字段已弃用,请改用 document.info.uploaded 字段。document.info.author字段已弃用,请改用 document.info.owner 字段。events.onReady事件被移除。- editorConfig.user 对象中的
firstname和lastname字段被删除。 - 添加了 events.onRequestSaveAs 事件。
- 添加了 events.onRequestInsertImage 事件。
- 添加了 insertImage 方法。
- 添加了 events.onRequestMailMergeRecipients 事件。
- 添加了 setMailMergeRecipients 方法。
- 添加了 setSharingSettings 方法。
- 添加了 events.onRequestUsers 事件。
- 添加了 setUsers 方法。
- 添加了 events.onRequestSendNotify 事件。
版本 5.3
- 添加了转换到 OOXML(dotx、 xltx、potx)和 ODF(ott、ots、otp)模板的功能。
- 添加了
editorConfig.customization.reviewDisplay字段。 editorConfig.customization.commentAuthorOnly字段现在也用于限制评论删除。- 添加了 editorConfig.customization.compactHeader 字段。
- 添加了 editorConfig.customization.hideRightMenu 字段。
- 添加了 editorConfig.customization.toolbarNoTabs 字段。
- 为受密码保护的文档添加了转换错误。
- 添加了 editorConfig.actionLink 字段。
- 添加了 setActionLink 方法。
- 添加了 events.onMakeActionLink 事件。
版本 5.2
- 请求正文参数中的令牌。
- document.permissions.comment 适用于所有类型的编辑器。
- 添加了 document.permissions.fillForms 字段。
- 添加了 editorConfig.customization.help 字段。
- 添加了使 editorConfig.customization.logo 不可点击的可能性。
- 为转换的 aspect 字段添加值
2。
版本 5.1
- 在 downloadAs 方法中添加了
format参数。 - 添加了 document.permissions.modifyContentControl 字段。
- 添加了 OpenDocument Template 格式的转换。
- 添加了 events.onRequestClose 事件。
- 添加了 editorConfig.customization.goback.blank 字段。
版本 5.0
- 添加了 document.permissions.modifyFilter 字段。
- 添加了启用宏的文档、文档模板和平面文档格式的转换。
events.onReady事件已弃用,请改用 events.onAppReady 事件。- 添加了 events.onDocumentReady 事件。
- 添加了 editorConfig.plugins.autostart 字段。
- 添加了 events.onWarning 事件。
- 添加了文档生成器服务。
版本 4.4
- 更改了 showMessage 方法。
- 添加了转换到 odp 格式的功能。
- 添加了 document.permissions.comment 字段。
- 添加了
document.permissions.changeHistory字段。 - 添加了 events.onRequestRestore 事件。
- 添加了
document.permissions.rename字段。 - 添加了 events.onRequestRename 事件。
- 添加了 meta 命令。
- 添加了 events.onMetaChange 事件。
- 添加了最后一个加入共同编辑的用户对
callbackUrl的使用。 - 添加了 editorConfig.location 字段。
- 添加了 editorConfig.embedded.autostart 字段。
版本 4.3
- 添加了 destroyEditor 方法。
- 从插件连接模式中删除了
editorConfig.plugins.url方法。 - 添加了
editorConfig.customization.commentAuthorOnly方法。 - 添加了 editorConfig.customization.forcesave 方法。
- 添加了
editorConfig.customization.showReviewChanges方法。 - 强制保存文件时,在回调处理程序请求中添加了 forcesavetype 方法。
- 为文档转换服务的添加了 JSON 格式响应。
版本 4.2
firstname和lastname字段已弃用,请改用 name 字段。- 添加了在开源版本中为 editorConfig.customization.chat 和 editorConfig.customization.comments 指定值的可能性。
- 添加了 editorConfig.customization.compactToolbar 字段。
- 添加了 editorConfig.customization.zoom 字段。
- 添加了 editorConfig.customization.autosave 字段。
- changeshistory 字段已删除,请改用 history 字段。
- 更改了 setHistoryData 方法。
- 在文档转换服务中添加了将文件转换为缩略图的可能性。
- POST 请求现在用于与文档命令服务和文档转换服务的交互。
- 添加了 version 命令。
- 添加了编辑器打开和传入传出请求的 signature。