在项目中存在展示office内容,但是不提供下载的情况。
const config = {
documentType: "word", // 或 "spreadsheet", "presentation" 等
document: {
title: "示例文档",
url: "https://yourserver.com/path/to/document.docx",
fileType: "docx",
key: "unique-document-key",
// 其他文档相关配置
},
editorConfig: {
mode: "view", // 仅查看模式
permissions: {
edit: false, // 禁止编辑
download: false, // 禁止下载
print: false, // 禁止打印
upload: false, // 禁止上传修改
comment: false, // 禁止评论
// 其他权限设置
},
language: "zh-CN",
// 其他编辑器配置
}
};