May I ask whether onlyoffice can be implemented: Fill the tag in the document with data

If there are tag in the document, such as inserting text, picture, table, etc;
In addition to the simple replacement of text and pictures, the table part scenario is: when the table data to be replaced has several suppose 10 data, then the replaced document will have 10 rows of data in the table part.
How can onlyoffice implement this scenario.

The following is an example to help you understand

Hello @zcs

In general, you can use following methods to replace simple text and images:

For more complex data you create Content Controls and replace them with required elements using ReplaceByElement method, i.e. Content Controls will represent a tag:

var oDocument = Api.GetDocument();
var oBlockLvlSdt = Api.CreateBlockLvlSdt();
oDocument.AddElement(0, oBlockLvlSdt);
var oParagraph = Api.CreateParagraph();
var oDrawing = Api.CreateImage("", 60 * 36000, 35 * 36000);
oParagraph.AddText("The content control was replaced with the current paragraph.");
//oParagraph.AddDrawing(oDrawing);  // to replace content control with image

Same would apply to tables which must be created first. To create table use CreateTable method and to fill it use required methods described here:

To pass external data to .docbuilder script refer to this article: