Skip to main content

AddContentControl

Adds an empty content control to the document.

Syntax​

expression.AddContentControl(type, commonPr);

expression - A variable that represents an Api class.

Parameters​

NameRequired/OptionalData typeDefaultDescription
typeRequiredContentControlTypeA numeric value that specifies the content control type. It can have one of the following values: 1 (block), 2 (inline), 3 (row), or 4 (cell).
commonPrOptionalContentControlProperties{}The common content control properties.

Returns​

ContentControl

Example​

window.Asc.plugin.executeMethod ("AddContentControl", [1, {"Id" : 7, "Tag" : "{tag}", "Lock" : 0}]);