稽查文档预览
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
1fb76ca72d
commit
91d31b4226
|
@ -29,54 +29,19 @@
|
|||
obj[arr[0]] = window.decodeURIComponent(arr[1])
|
||||
})
|
||||
var docEditor = new window.DocsAPI.DocEditor("placeholder", {
|
||||
type: "embedded",
|
||||
"document": {
|
||||
"fileType": obj.type,
|
||||
"key": "Khirz6zTPdfd7" + Date.now(),
|
||||
"title": obj.title,
|
||||
"url": url
|
||||
},
|
||||
permissions: {
|
||||
edit: false, // 👈 禁止编辑
|
||||
download: false, // 允许下载
|
||||
print: false, // 允许打印
|
||||
review: false, // 关闭审阅模式
|
||||
comment: false, // 禁用评论
|
||||
copy: false, // 禁用内容复制
|
||||
modifyFilter: false // 禁止修改格式
|
||||
},
|
||||
editorConfig: {
|
||||
mode: 'view', // 强制进入查看模式
|
||||
user: {
|
||||
name: obj.userName,
|
||||
permissions: "Read Only"
|
||||
},
|
||||
customization: {
|
||||
features: {
|
||||
edit: false, // 隐藏编辑按钮
|
||||
save: false, // 隐藏保存按钮
|
||||
print: false, // 显示打印按钮
|
||||
download: false, // 显示下载按钮
|
||||
comment: false, // 隐藏评论功能
|
||||
rightMenu: false, // 禁用右键菜单
|
||||
showReviewChanges: false, // 隐藏修订标记
|
||||
toolbar: false, // 完全隐藏工具栏(可选)
|
||||
downloadAs: false, // 隐藏"另存为"按钮
|
||||
plugins: false, //定义是否将启动插件并可用。默认值为true
|
||||
},
|
||||
},
|
||||
events: {
|
||||
onRequestDownload: () => {
|
||||
console.warn('下载请求已被阻止');
|
||||
return false;
|
||||
},
|
||||
onRequestPrint: () => {
|
||||
console.warn('打印请求已被阻止');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
"url": url,
|
||||
},
|
||||
// editorConfig: {
|
||||
// lang:'zh'
|
||||
|
||||
// },
|
||||
"documentType": obj.documentType,
|
||||
"height": "100%"
|
||||
"height": "100%",
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue