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

Description

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

See the available window.Asc.plugin.executeMethod methods below to find more about them.

Methods and properties

Currently, the following six 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.
AddOleObject This method allows to add an OLE object to the document.
EditOleObject This method allows to edit an OLE object in the document.
GetFontList This method allows to get the fonts list.
InputText This method allows to insert text into the document.
PasteHtml This method allows to paste text in html format into the document.
PasteText This method allows to paste text into the document.
GetMacros This method allows to get the document macros.
SetMacros This method allows to set macros to the document.
StartAction This method allows to specify the start action for long operations.
EndAction This method allows to specify the end action for long operations.
OnEncryption This method allows to encrypt plugins.
SetProperties This method allows to set the properties to the document.
ShowInputHelper This method allows to show the input helper.
UnShowInputHelper This method allows to unshow the input helper.
For the plugin to work correctly, it is necessary to wait until the current method is executed before executing the next method.