Get Started
Plugins
Macros
More information

window.Asc.plugin.executeMethod ("GetAllContentControls", callback)

Description

Defines the method that allows getting information about all the content controls that have been added to the page.

Usage

This method should be used in the following way:

window.Asc.plugin.executeMethod ("GetAllContentControls");
Returns

The method returns the data in the following form (JSON):

[
    {
        "Tag": "Document",
        "Id": 0,
        "Lock": 0,
        "InternalId": "1_713"
    }
]
Example
var flagInit = false;
window.Asc.plugin.init = function (text) {
    if (!flagInit) {
        this.executeMethod ("GetAllContentControls", null, function(data) {
            for (var i = 0; i < data.length; i++) {
                if (data[i].Tag == 11) {
                    this.Asc.plugin.executeMethod("SelectContentControl",[data[i].InternalId]);
                    break;
                }
            }
        });
        flagInit = true;
        ...
    }
};