回调接口供石墨文档中台调用。关于回调接口的解释,参考:【后端】回调接口说明。Java、Go、PHP、Python 实现,主要用提供你的平台前端业务需要的后端接 口,同时也负责和石墨文档中台进行数据互通。Web 或者 HTML5。https://your-endpoint-url.comhttps://weboffice-shimo-local.commy-new-file-u98213uuid 等方式避免重复。{
"id": "my-new-file-u98213",
"name": "第一个协同文档",
"type": "documentPro",
"permissions": {
"commentable": true,
"editable": true,
"readable": true,
"copyable": true,
"exportable": true
},
"views": 100,
"creatorId": "1",
"createdAt": "2021-08-01T00:00:00Z",
"updatedAt": "2021-08-02T00:00:00Z",
"teamGuid": "123"
}{
"id": "userid123",
"name": "张三",
"avatar": "http://fake.site/user-123.png",
"email": "user123@fake.site",
"teamGuid": "123"
}index.js 中填入 signature, token, endpointUrl, fileId 这四个变量后,用浏览器打开 index.html 即可看到文档编辑器。html 页面,包含一个父容器用来承载石墨的 iframe。npm view 和 npm pack 下载代码包 (.tgz 格式).shimo-js-sdk-1.2.1.tgz。dist 的文件夹。shimo-doc-test。shimo-js-sdk 文件夹放在 shimo-doc-test 文件夹下。index.js 和 index.html,它们的内容如下:shimo-js-sdk,并将步骤 1 中得到的 dist 文件夹放入其中,此时目录结构如下:shimo-doc-test/
├── index.js
└── index.html
└── shimo-js-sdk/
└── dist/index.html 文件,页面中将出现石墨的编辑器(iframe 方式挂载在配置的目标容器下),此时可编辑该协同文档。permissions 中至少有可读权限预览模式下都是只读,只关注是否可读,其他权限点不影响
/sdk/v2/collab-files/{fileId} 地址/sdk/v2/api/cloud-files/{fileId}/page