Get Started
Plugins
Macros
More information

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

Description

Defines the method used to execute certain editor methods using the plugin.

The callback is the result that the method returns. It is an optional parameter. In case it is missing, the  window.Asc.plugin.onMethodReturn function will be used to return the result of the method execution.

Parameters
Name Description Type
name The name of the specific method that must be executed string
args The arguments that the method in use has (if it has any). array
callback The result that the method returns. function

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

Methods and properties
Name Description
AddComment This method allows to add a comment to the document.
AddContentControl This method allows to add an empty content control to the document.
AddOleObject This method allows to add an OLE object to the document.
ChangeComment This method allows to change the specified comment.
EditOleObject This method allows to edit an OLE object in the document.
EndAction This method allows to specify the end action for long operations.
GetAllComments This method allows to get all the comments from the document.
GetAllContentControls This method allows to get information about all the content controls that have been added to the page.
GetCurrentContentControl This method allows to get the identifier of the selected content control.
GetCurrentContentControlPr This method allows to get current content control properties.
GetFields This method allows to open file with fields.
GetFileHTML This method allows to get file content in the HTML format.
GetFontList This method allows to get the fonts list.
GetMacros This method allows to get the document macros.
GetSelectedText This method allows to get the selected text from the document.
InputText This method allows to insert text into the document.
InsertAndReplaceContentControls This method allows to insert a content control that contains data.
MoveCursorToContentControl This method allows to move the cursor to the specified content control.
MoveCursorToEnd This method allows to move the cursor to the end position.
MoveCursorToStart This method allows to move the cursor to the start position.
MoveToComment This method allows to move the cursor to the specified comment.
OnEncryption This method allows to encrypt the document.
OpenFile This method allows to open file with fields.
PasteHtml This method allows to paste text in the html format into the document.
PasteText This method allows to paste text into the document.
RemoveComments This method allows to remove the specified comments.
RemoveContentControl This method allows to remove a content control, but leave all its contents.
RemoveContentControls This method allows to remove several content controls.
RemoveSelectedContent This method allows to remove the selected content from the document.
SearchAndReplace This method allows to find and replace the text.
SelectContentControl This method allows to select the specified content control.
SetMacros This method allows to set macros to the document.
SetProperties This method allows to set the properties to the document.
ShowInputHelper This method allows to show the input helper.
StartAction This method allows to specify the start action for long operations.
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.