Get Started
Plugins
Macros
More information

window.Asc.plugin.executeMethod ("RemoveContentControl", [args], callback)

Description

Defines the method that allows removing the currently selected content control retaining all its contents. The content control where the mouse cursor is currently positioned will be removed.

Usage

This method should be used in the following way:

window.Asc.plugin.executeMethod ("RemoveContentControl", [InternalId]);
Parameters
Parameter Description Type Example
InternalId A unique internal identifier of the content control. string "5_665"
Returns

The method returns an object which contains the following values:

{
    "Parent" : object,
    "Pos" : integer,
    "Count" : integer
}
Parameters
Parameter Description Type Example
Parent The content control parent. object oParagraph
Pos The content control position within the parent object. integer 0
Count A number of elements in the parent object. integer 1
Example
window.buttonIDChangeState_click = undefined;
    if (null == returnValue) {
        window.Asc.plugin.executeMethod("AddContentControl", [1, {"Id" : 7, "Lock" : 0, "Tag" : "{some text}"}]);
    }
    else {
        window.Asc.plugin.executeMethod("RemoveContentControl", [returnValue]);
    }