Get Started
More information

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


Defines the method that allows getting current content control properties.


This method should be used in the following way:

window.Asc.plugin.executeMethod ("GetCurrentContentControlPr");

The method returns the ContentControlProperties object containing the content control properties in the following form (JSON):

    "Id" : number,
    "Tag" : string,
    "Lock" : number,
    "Alias" : string,
    "Appearance" : number,
    "Color" : {
        "R": number,
        "G": number,
        "B": number
Parameter Description Type Example
Id A unique content control identifier. It can be used to search for a certain content control and make reference to it in your code. number 0
Tag A tag assigned to the content control. The same tag can be assigned to several content controls so that you can make reference to them in your code. string "{tag}"
Lock A value that defines if it is possible to delete and/or edit the content control or not. number 0
Alias The alias attribute. string "№1"
Appearance Defines if the content control is shown as the bounding box (1) or not (2). number 1
Color The color for the current content control in the RGB format:
  • R - red color component value,
    type: number,
    example: 0;
  • G - green color component value,
    type: number,
    example: 0;
  • B - blue color component value,
    type: number,
    example: 255;

The Lock parameter can have the following values:

Numeric value Edit Delete
0 No Yes
1 No No
2 Yes No
3 Yes Yes
window.Asc.plugin.event_onClick = function(isSelectionUse) {
    window.Asc.plugin.executeMethod("GetCurrentContentControlPr", [], function(obj) {
        window.Asc.plugin.currentContentControl = obj;
        var controlTag = obj ? obj.Tag : "";
        if (isSelectionUse)
            controlTag = "";