Google Docs has recently introduced a feature where we can refer to
- Date
- Person
- Google Drive Document
in the form of a Chip Block (as shown in the picture above). The Document-A already exists in Google Drive.
Currently the only way to generate such Chip Block is to manually hover the document link and then click Replace URL - Chip
in the pop up modal that appears.
I am trying to generate such chip block using Google App Script but have not been successful so far.
Rich Link Documentation does not have any code snippet or method to add a Rich Link inside a document.
Document Service page also doesn't have detail regarding how to insert a Rich Link.
I wonder whether the feature is not yet implemented in the Google App Script Api
EDIT
As mentioned by Stephen Shaw this issue has been flagged on Google Issue Tracker Create and insert smart chips by maclir. Hoping for an early implementation of this feature.