window.Asc.plugin.executeMethod ("RemoveContentControl", [args], callback)
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.
This method should be used in the following way:
window.Asc.plugin.executeMethod ("RemoveContentControl", [InternalId]);
Parameter |
Description |
Type |
Example |
InternalId |
A unique internal identifier of the content control. |
string |
"5_665" |
The method returns an object which contains the following values:
{
"Parent" : object,
"Pos" : number,
"Count" : number
}
Parameter |
Description |
Type |
Example |
Parent |
The content control parent. |
object |
oParagraph |
Pos |
The content control position within the parent object. |
number |
0 |
Count |
A number of elements in the parent object. |
number |
1 |
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]);
}