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


The window.Asc.plugin object method that allows to execute certain editor methods using the plugin. The Name is the name of the specific method which must be executed, [args] are the arguments the used method has (in case it has any), and the callback is the result the method returns. The latter is an optional parameter, in case it is missing, the window.Asc.plugin.onMethodReturn will be used to return the method execution result.

See the available window.Asc.plugin.executeMethod methods below to find more on each of them.

Methods and properties

Currently, the following 6 methods are available that can be executed in this way:

Name Description
InsertAndReplaceContentControls This method inserts a content control that contains data.
RemoveContentControls This method allows to remove several content controls.
GetAllContentControls This method allows to get information about all content controls that have been added to the page.
AddContentControl This method allows to add an empty content control to the document.
RemoveContentControl This method allows to remove a content control, but leave all its contents.
GetCurrentContentControl This method allows to get the identifier of the selected content control.
For the plugin to work correctly, it's necessary to wait until the current method is executed before executing the next method.