4

while looking over the Google Drive documentation for comments here on the dev site it mentions

anchor; string; A region of the document represented as a JSON string. See anchor documentation for details on how to define and interpret anchor properties.

However, where is the anchor documentation?

Joe Simpson
  • 2,546
  • 4
  • 30
  • 46

1 Answers1

3

See https://developers.google.com/drive/manage-comments for details.

FWIW, anchors are a bit limited at the moment. The biggest issue is anchors on comments are immutable. If you end up using a custom scheme and can refer to something uniquely identifiable in your content (e.g. an XML element ID or some other marker) then you shouldn't have any issues. But some of the other anchor schemes detailed on the doc are problematic. For example anchoring to a line in a text file will break if the file is modified an a line is inserted before the anchor location. Until anchors are mutable, best to limit your self to custom schemes and/or unanchored comments.

Steve Bazyl
  • 11,002
  • 3
  • 21
  • 24
  • This seems to be related to [what I'm stuck trying to do](http://stackoverflow.com/questions/29050342/how-to-match-comments-on-an-image-using-kix-anchor-or-not-in-google-docs) now... Surprised there's not been a change to immutable, unreadably-anchored comments since their release 3 years back! Like you say, undeniably a bit limited, and there aren't any other prominent examples of custom anchoring schemes (unless you know of any Steve?) – Louis Maddox Mar 14 '15 at 22:06
  • Is there any change now - 5 years later? – John Nov 08 '17 at 13:18