相关疑难解决方法(0)

如何在 Google 文档中使用 kix 锚点(或不使用 kix 锚点)匹配图像上的评论

可以检索打开的 Google 文档文档的元素,从

\n\n
DocumentApp.openById(doc_id, folder_id)\n
Run Code Online (Sandbox Code Playgroud)\n\n

但文档上的评论是通过 Drive API 检索的Comments.list

\n\n

在包含 2 条注释的文档上运行此命令:一条在图像上,一条在段落中的单词上,这表明虽然文本锚定注释可以,但图像不会返回条目context

\n\n
 "content": "test comment on text",\n "deleted": false,\n "status": "open",\n "context": {\n  "type": "text/html",\n  "value": "some text the comment is placed on"\n },\n "anchor": "kix.xxxxxxxxxxx1",\n
Run Code Online (Sandbox Code Playgroud)\n\n
\n\n
 "content": "test comment on an image",\n "deleted": false,\n "status": "open",\n "anchor": "kix.xxxxxxxxxxx2",\n
Run Code Online (Sandbox Code Playgroud)\n\n

其中xxxxxxxxxxx1/xxxxxxxxxxx2是唯一的锚点 ID 后缀,以及kixGoogle“专有”锚点/编辑器系统的前缀(正如 Steven Bazyl 在“管理评论和讨论”开发者指南页面的视频中所描述的那样)。

\n\n
\n

“锚点基本上告诉我们该评论适用于文档中的哪个位置。因为这是我们的格式(在 …

google-api google-docs-api google-drive-api

5
推荐指数
1
解决办法
983
查看次数