跳到主要内容

Api

Represents the Api class.

Methods

MethodReturnsDescription
AcceptReviewChangesNoneAccepts review changes.
AddAddinFieldNoneCreates a new addin field with the data specified in the request.
AddCommentstring | nullAdds a comment to the document.
AddContentControlContentControlAdds an empty content control to the document.
AddContentControlCheckBoxNoneAdds an empty content control checkbox to the document.
AddContentControlDatePickerNoneAdds an empty content control datepicker to the document.
AddContentControlListNoneAdds an empty content control list to the document.
AddContentControlPictureNoneAdds an empty content control picture to the document.
AddOleObjectNoneAdds an OLE object to the current document position.
CanRedobooleanChecks if it possible to revert the user's last undone action.
CanUndobooleanChecks if it is possible to undo the user's last action.
ChangeCommentNoneChanges the specified comment.
ChangeOleObjectNoneChanges the OLE object with the InternalId specified in OLE object data.
ChangeOleObjectsNoneChanges multiple OLE objects with the InternalIds specified in OLE object data.
CoAuthoringChatSendMessageNoneSends a message to the co-authoring chat.
ConvertDocumentstringConverts a document to Markdown or HTML text.
EditOleObjectNoneEdits an OLE object in the document.
EndActionNoneSpecifies the end action for long operations.
GetAllAddinFieldsAddinFieldData[]Returns all addin fields from the current document.
GetAllCommentscomment[]Returns all the comments from the document.
GetAllContentControlsContentControl[]Returns information about all the content controls that have been added to the page.
GetAllFormsContentControl[]Returns information about all the forms that have been added to the document.
GetAllOleObjectsOLEObjectData[]Returns all OLE object data for objects which can be opened by the specified plugin.\ If sPluginId is not defined, this method returns all OLE objects contained in the currrent document.
GetCurrentContentControlstringReturns an identifier of the selected content control (i.e. the content control where the mouse cursor is currently positioned).
GetCurrentContentControlPrContentControlPropertiesReturns the current content control properties.
GetCurrentSentencestringReturns the current sentence.
GetCurrentWordstringReturns the current word.
GetDocumentLangstringReturns the document language.
GetFieldsstring[]Returns all fields as a text.
GetFileHTMLstringReturns file content in the HTML format.
GetFileToDownloadstringReturns the current file to download in the specified format.
GetFontListFontInfo[]Returns the fonts list.
GetFormValuenull | string | booleanReturns a value of the specified form.
GetFormsByTagContentControl[]Returns information about all the forms that have been added to the document with specified tag.
GetImageDataFromSelectionImageDataReturns the image data from the first of the selected drawings. If there are no drawings selected, the method returns a white rectangle.
GetInstalledPluginsPluginData[]Returns all the installed plugins.
GetMacrosMacrosReturns the document macros.
GetSelectedContentstringReturns the selected content in the specified format.
GetSelectedOleObjectsOLEProperties[]Returns an array of the selected OLE objects.
GetSelectedTextstringReturns the selected text from the document.
GetSelectionTypeSelectionTypeReturns the type of the current selection.
GetVBAMacrosstring | nullReturns all VBA macros from the document.
GetVersionstringReturns the editor version.
InputTextNoneInserts text into the document.
InsertAndReplaceContentControlsContentControlProperties[]Inserts the content control containing data. The data is specified by the JS code for Document, or by a link to the shared document.
InsertOleObjectNoneInserts the OLE object at the current document position.
InstallPluginobjectInstalls a plugin using the specified plugin config.
MouseMoveWindowNoneSends an event to the plugin when the mouse button is moved inside the plugin iframe.
MouseUpWindowNoneSends an event to the plugin when the mouse button is released inside the plugin iframe.
MoveCursorToContentControlNoneMoves a cursor to the specified content control.
MoveCursorToEndNoneMoves a cursor to the end of the current editing area (document body, footer/header, footnote, or autoshape).\ This method is similar to pressing the -Ctrl + End keyboard shortcut.
MoveCursorToStartNoneMoves a cursor to the beginning of the current editing area (document body, footer/header, footnote, or autoshape).\ This method is similar to pressing the -Ctrl + Home keyboard shortcut.
MoveToCommentNoneMoves a cursor to the specified comment.
MoveToNextReviewChangeNoneNavigates through the review changes.
OnDropEventNoneImplements the external drag&drop emulation.
OnEncryptionNoneEncrypts the document.
OpenFileNoneOpens a file with fields.
PasteHtmlNonePastes text in the HTML format into the document.
PasteTextNonePastes text into the document.
PutImageDataToSelectionNoneReplaces the first selected drawing with the image specified in the parameters.\ If there are no drawings selected, the method inserts the image at the current position.
RedoNoneReverts the user's last undone action.
RejectReviewChangesNoneRejects review changes.
RemoveCommentsNoneRemoves the specified comments.
RemoveContentControlContentControlParentPrRemoves the currently selected content control retaining all its contents. The content control where the mouse cursor is currently positioned will be removed.
RemoveContentControlsNoneRemoves several content controls.
RemoveFieldWrapperNoneRemoves a field wrapper, leaving only the field content.
RemoveOleObjectNoneRemoves the OLE object from the document by its internal ID.
RemoveOleObjectsNoneRemoves several OLE objects from the document by their internal IDs.
RemovePluginobjectRemoves a plugin with the specified GUID.
RemoveSelectedContentNoneRemoves the selected content from the document.
ReplaceCurrentSentenceNoneReplaces the current sentence with the specified string.
ReplaceCurrentWordNoneReplaces the current word with the specified string.
ReplaceTextSmartbooleanReplaces each paragraph (or text in cell) in the select with the corresponding text from an array of strings.
SearchAndReplaceNoneFinds and replaces the text.
SearchNextbooleanFinds and selects the next occurrence of the text starting at the current position.
SelectContentControlNoneSelects the specified content control.
SelectOleObjectNoneSelects the specified OLE object.
SetDisplayModeInReviewNoneSets the display mode for track changes.
SetEditingRestrictionsNoneSets the document editing restrictions.
SetFormValueNoneSets a value to the specified form.
SetMacrosNoneSets macros to the document.
SetPluginsOptionsNoneConfigures plugins from an external source. The settings can be set for all plugins or for a specific plugin.\ For example, this method can be used to pass an authorization token to the plugin. This method can be used only with the connector class.
SetPropertiesNoneSets the properties to the document.
ShowButtonNoneShows or hides buttons in the header.
ShowErrorNoneShows an error/warning message.
ShowInputHelperNoneShows the input helper.
StartActionNoneSpecifies the start action for long operations.
UnShowInputHelperNoneUnshows the input helper.
UndoNoneUndoes the user's last action.
UpdateAddinFieldsNoneUpdates the addin fields with the specified data.
UpdatePluginobjectUpdates a plugin using the specified plugin config.