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.
AddContentControlCheckBox This method allows to add an empty content control checkbox to the document.
AddContentControlDatePicker This method allows to add an empty content control datepicker to the document.
AddContentControlList This method allows to add an empty content control list to the document.
AddContentControlPicture This method allows to add an empty content control picture to the document.
AddOleObject This method allows to add the OLE object to the current document position.
ChangeComment This method allows to change the specified comment.
ChangeOleObjects This method allows to change multiple OLE objects with the InternalIds specified in OLE object data.
CoAuthoringChatSendMessage This method allows to send a message to the co-authoring chat.
ConvertDocument This method allows to convert a document to Markdown or HTML text.
EditOleObject This method allows to change the OLE object with the InternalId specified in OLE object data.
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.
GetAllOleObjects This method allows to get all OLE object data for objects which can be opened by the specified plugin.
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 get all fields as a text.
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.
GetSelectionType This method allows to get the type of the current selection.
GetVersion This method allows to get the editor version.
InputText This method allows to insert text into the document.
InsertAndReplaceContentControls This method allows to insert the content control that contains data.
InsertOleObject This method allows to insert the OLE object at the current document position.
MoveCursorToContentControl This method allows to move a cursor to the specified content control.
MoveCursorToEnd This method allows to move a cursor to the end position.
MoveCursorToStart This method allows to move a cursor to the start position.
MoveToComment This method allows to move a cursor to the specified comment.
OnEncryption This method allows to encrypt the document.
OpenFile This method allows to open a 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 the currently selected content control retaining all its contents.
RemoveContentControls This method allows to remove several content controls.
RemoveOleObject This method allows to remove OLE object from the document by its internal ID.
RemoveOleObjects This method allows to remove several OLE objects from the document by their internal IDs.
RemoveSelectedContent This method allows to remove the selected content from the document.
ReplaceTextSmart This method allows to replace each paragraph (or text in cell) in the select with the corresponding text from an array of strings.
SearchAndReplace This method allows to find and replace the text.
SelectContentControl This method allows to select the specified content control.
SelectOleObject This method allows to select the specified OLE object.
SetDisplayModeInReview This method allows to set the display mode for track changes.
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.