InsertAndReplaceContentControls

InsertAndReplaceContentControls(arrDocuments) → { Array.<ContentControlProperties> }

Inserts the content control containing data. The data is specified by the JS code for Document Builder, or by a link to the shared document.

Parameters:

Name Type Description
arrDocuments Array.<ContentControlPropertiesAndContent>

An array of properties and contents of the content control.

Returns:

Type
Array.<ContentControlProperties>

Example

Copy code
var arrDocuments = [{
    "Props": {
        "Id": 100,
        "Tag": "CC_Tag",
        "Lock": 3
    },
    "Script": "var oParagraph = Api.CreateParagraph();oParagraph.AddText('Hello world!');Api.GetDocument().InsertContent([oParagraph]);"
}];
window.Asc.plugin.executeMethod ("InsertAndReplaceContentControls", [arrDocuments]);