diff --git a/common/apiBase_plugins.js b/common/apiBase_plugins.js
index 3bc34cffdd..df5f2037c8 100644
--- a/common/apiBase_plugins.js
+++ b/common/apiBase_plugins.js
@@ -35,106 +35,107 @@
(function(window, undefined)
{
/**
- * Plugin config
+ * Plugin config.
* @typedef {Object} Config
*
* @property {string} name
* Plugin name which will be visible at the plugin toolbar.
*
* @property {?Object} nameLocale
- * Plugin name translations. Example: { "fr" : "trFr", "de" : "deTr" }
+ * Translations for the name field. The object keys are the two letter language codes (ru, de, it, etc.) and the values are the plugin name translation for each language. Example: { "fr" : "trFr", "de" : "deTr" }.
*
- * @property {string} guid Plugin id
+ * @property {string} guid
* Plugin identifier. It must be of the asc.{UUID} type.
*
* @property {?string} [baseUrl=""]
- * Path to the plugin. All the other paths are calculated relative to this path. In case the plugin is installed on the server, an additional parameter (path to the plugins) is added there. If baseUrl == "" the path to all plugins will be used.
+ * Path to the plugin. All the other paths are calculated relative to this path. In case the plugin is installed on the server, an additional parameter (path to the plugins) is added there. If baseUrl == "", the path to all plugins will be used.
*
* @property {Variation[]} variations
- * Plugin variations or "subplugins" - see the Plugin variations section
+ * Plugin variations, or subplugins, that are created inside the origin plugin.
*/
/**
- * Editors possible values
+ * The editors which the plugin is available for ("word" - text document editor, "cell" - spreadsheet editor, "slide" - presentation editor).
* @typedef {("word" | "slide" | "cell")} EditorType
*/
/**
- * Init data types
+ * The data type selected in the editor and sent to the plugin: "text" - the text data, "html" - HTML formatted code, "ole" - OLE object data, "desktop" - the desktop editor data, "destop-external" - the main page data of the desktop app (system messages), "none" - no data will be send to the plugin from the editor.
* @typedef {("none" | "text" | "ole" | "html" | "desktop")} InitDataType
*/
/**
- * Event types
+ * Plugin event.
* @typedef {("onDocumentContentReady" | "onTargetPositionChanged" | "onClick" | "onInputHelperClear" | "onInputHelperInput")} EventType
*/
/**
- * Plugin variation
+ * Plugin variations, or subplugins, that are created inside the origin plugin.
* @typedef {Object} Variation
* @property {string} description
* The description, i.e. what describes your plugin the best way.
*
* @property {?Object} descriptionLocale
- * The description translations (see config.nameLocale)
+ * Translations for the description field. The object keys are the two letter language codes (ru, de, it, etc.) and the values are the plugin description translation for each language.
*
* @property {string} url
- * Plugin entry point, i.e. HTML file which connects the pluginBase.js (the base file needed for work with plugins) file and launches the plugin code.
+ * Plugin entry point, i.e. an HTML file which connects the plugin.js file (the base file needed for work with plugins) and launches the plugin code.
*
- * @property {string[]} icons List icons (with support hi-dpi)
- * Plugin icon image files used in the editors: for common screens and with doubled resolution for retina screens.
+ * @property {string[]} icons (with support HiDPI)
+ * Plugin icon image files used in the editors. There can be several scaling types for plugin icons: 100%, 125%, 150%, 175%, 200%, etc.
*
* @property {?boolean} [isViewer=true]
- * Specifies if the plugin is available when the document is available in viewer mode only or not.
+ * Specifies if the plugin is working when the document is available in the viewer mode only or not.
*
* @property {boolean} isDisplayedInViewer
- * Specifies if the plugin will be displayed in viewer mode as well as in editor mode (isDisplayedInViewer == true) or in the editor mode only (isDisplayedInViewer == false).
+ * Specifies if the plugin will be displayed in the viewer mode as well as in the editor mode (isDisplayedInViewer == true) or in the editor mode only (isDisplayedInViewer == false).
*
* @property {EditorType[]} EditorsSupport
- * The editors which the plugin is available for.
+ * The editors which the plugin is available for ("word" - text document editor, "cell" - spreadsheet editor, "slide" - presentation editor).
*
* @property {boolean} [isVisual=true]
* Specifies if the plugin is visual (will open a window for some action, or introduce some additions to the editor panel interface) or non-visual (will provide a button (or buttons) which is going to apply some transformations or manipulations to the document).
*
* @property {boolean} [isModal=true]
- * Specifies if the opened plugin window is modal, i.e. a separate modal window must be opened, or not (used for visual plugins only). The following rule must be observed at all times: isModal != isInsideMode.
+ * Specifies if the opened plugin window is modal (used for visual plugins only, and if isInsideMode is not true).
*
* @property {boolean} [isInsideMode=false]
- * Specifies if the plugin must be displayed inside the editor panel instead of its own window (used for visual non-modal plugins only). The following rule must be observed at all times: isModal != isInsideMode.
+ * Specifies if the plugin must be displayed inside the editor panel instead of its own window.
*
* @property {boolean} isCustomWindow
- * For modal plugins only. Is using custom window, without standard borders & buttons.
+ * Specifies if the plugin uses a custom window, without standard borders and buttons (used for modal plugins only).
*
* @property {boolean} isSystem
- * Specifies if the plugin is not displayed in the editor interface and is started in background with the server (or desktop editors start) not interfering with the other plugins, so that they can work simultaneously.
+ * Specifies if the plugin is not displayed in the editor interface and is started in the background with the server (or desktop editors start) not interfering with the other plugins, so that they can work simultaneously.
*
* @property {InitDataType} initDataType
- * The data type selected in the editor and sent to the plugin: "text" - the text data, "html" - HTML formatted code, "ole" - OLE object data, "none" - no data will be send to the plugin from the editor.
+ * The data type selected in the editor and sent to the plugin: "text" - the text data, "html" - HTML formatted code, "ole" - OLE object data, "desktop" - the desktop editor data, "destop-external" - the main page data of the desktop app (system messages), "none" - no data will be send to the plugin from the editor.
*
* @property {string} initData
- * Is always equal to "" - this is the data which is sent from the editor to the plugin at the plugin start (e.g. if initDataType == "text", the plugin will receive the selected text when run).
+ * Is usually equal to "" - this is the data which is sent from the editor to the plugin at the plugin start (e.g. if initDataType == "text", the plugin will receive the selected text when run). It may also be equal to encryption in the encryption plugins.
*
* @property {?boolean} isUpdateOleOnResize
- * Specifies if the OLE object must be redrawn when resized in the editor using the vector object draw type or not (used for OLE objects only, i.e. initDataType == "ole").
+ * Specifies if an OLE object must be redrawn when resized in the editor using the vector object draw type or not (used for OLE objects only, i.e. initDataType == "ole").
*
* @property {?Button[]} buttons
- * The list of skinnable plugin buttons used in the plugin interface (used for visual plugins with their own window only, i.e. isVisual == true && isInsideMode == false). The buttons can be primary or not, the primary flag affecting the button skin only.
+ * The list of skinnable plugin buttons used in the plugin interface (used for visual plugins with their own window only, i.e. isVisual == true && isInsideMode == false).
*
* @property {?boolean} [initOnSelectionChanged=true]
* Specifies if the plugin watches the text selection events in the editor window.
*
* @property {number[]} size
- * Size window on start
+ * Plugin window size.
*
* @property {EventType[]} events
+ * Plugin events.
*/
/**
- * Plugin buttons
+ * The skinnable plugin button used in the plugin interface (used for visual plugins with their own window only, i.e. isVisual == true && isInsideMode == false).
* @typedef {object} Button
- * @property {string} text
- * @property {string} textLocale
- * @property {boolean} primary
+ * @property {string} text - The label which is displayed on the button.
+ * @property {string} textLocale - Translations for the text field. The object keys are the two letter language codes (ru, de, it, etc.) and the values are the button label translation for each language.
+ * @property {boolean} primary - Defines if the button is primary or not. The primary flag affects the button skin only.
*/
/**
@@ -147,49 +148,50 @@
var Api = window["AscCommon"].baseEditorsApi;
/**
- * Get version of editor
+ * Returns the editor version.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias GetVersion
- * @returns {string} version
+ * @returns {string} - Editor version.
*/
Api.prototype["pluginMethod_GetVersion"] = function() { return this.GetVersion(); };
/**
- * Adding ole object to editor
+ * Adds an OLE object to the document.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias AddOleObject
* @this Api
- * @param {Object} data The properties for object.
- * @param {number} data.width Width object in millimeters.
- * @param {number} data.height Height object in millimeters.
- * @param {string} data.data Data for ole object (internal format).
- * @param {string} data.guid Ole object program identifier
- * @param {string} data.imgSrc Ole object graphic presentation
- * @param {number} data.widthPix Width imgSrc in pixels
- * @param {number} data.heightPix Height imgSrc in pixels
+ * @param {Object} data - The OLE object properties.
+ * @param {number} data.width - The object width measured in millimeters.
+ * @param {number} data.height - The object height measured in millimeters.
+ * @param {string} data.data - OLE object data (internal format).
+ * @param {string} data.guid - An OLE object program identifier which must be of the asc.{UUID} type.
+ * @param {string} data.imgSrc - A link to the image (its visual representation) stored in the OLE object and used by the plugin.
+ * @param {number} data.widthPix - The image width in pixels.
+ * @param {number} data.heightPix - The image height in pixels.
*/
Api.prototype["pluginMethod_AddOleObject"] = function(data) { return this.asc_addOleObject(data); };
/**
- * Edit ole object to editor
+ * Edits an OLE object in the document.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias EditOleObject
- * @param {Object} data The properties for object.
- * @param {number} data.width Width object in millimeters.
- * @param {number} data.height Height object in millimeters.
- * @param {string} data.data Data for ole object (internal format).
- * @param {string} data.objectId Ole object identifier
- * @param {string} data.imgSrc Ole object graphic presentation
- * @param {number} data.widthPix Width imgSrc in pixels
- * @param {number} data.heightPix Height imgSrc in pixels
+ * @param {Object} data - The OLE object properties.
+ * @param {number} data.width - The object width measured in millimeters.
+ * @param {number} data.height - The object height measured in millimeters.
+ * @param {string} data.data - OLE object data (internal format).
+ * @param {string} data.objectId - An OLE object identifier.
+ * @param {string} data.imgSrc - A link to the image (its visual representation) stored in the OLE object and used by the plugin.
+ * @param {number} data.widthPix - The image width in pixels.
+ * @param {number} data.heightPix - The image height in pixels.
*/
Api.prototype["pluginMethod_EditOleObject"] = function(data) { return this.asc_editOleObject(data); };
/**
- * @typedef {Object} FontInfo
+ * An object containing the font information.
+ * @typedef {Object} FontInfo
* @property {string} m_wsFontName
* @property {string} m_wsFontPath
* @property {number} m_lIndex
@@ -216,11 +218,11 @@
*/
/**
- * Get fonts list
+ * Returns the fonts list.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias GetFontList
- * @returns {FontInfo[]}
+ * @returns {FontInfo[]} - An array of the FontInfo objects.
*/
Api.prototype["pluginMethod_GetFontList"] = function()
{
@@ -228,12 +230,12 @@
};
/**
- * Insert text to editor
+ * Inserts text into the document.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias InputText
- * @param {string} text Text for insert
- * @param {string} textReplace Replace last text
+ * @param {string} text - A string value that specifies the text to be inserted into the document.
+ * @param {string} textReplace - A string value that specifies the text to be replaced with a new text.
*/
Api.prototype["pluginMethod_InputText"] = function(text, textReplace)
{
@@ -255,11 +257,11 @@
};
/**
- * Paste into editor
+ * Pastes text in the HTML format into the document.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias PasteHtml
- * @param {string} htmlText Text in html format
+ * @param {string} htmlText - A string value that specifies the text in the HTML format to be pasted into the document.
*/
Api.prototype["pluginMethod_PasteHtml"] = function(htmlText)
{
@@ -337,11 +339,11 @@
};
/**
- * Paste text into editor
+ * Pastes text into the document.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias PasteText
- * @param {string} text Text
+ * @param {string} text - A string value that specifies the text to be pasted into the document.
*/
Api.prototype["pluginMethod_PasteText"] = function(text)
{
@@ -352,17 +354,18 @@
};
/**
+ * An object containing the macros data.
* @typedef {Object} Macros
- * @property {string[]} macrosArray Macros codes
- * @property {number} current Current index
+ * @property {string[]} macrosArray - An array of macros codes ([{"name": "Macros1", "value": "{macrosCode}"}]).
+ * @property {number} current - A current macro index.
*/
/**
- * Get all macroses in document
+ * Returns the document macros.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias GetMacros
- * @returns {Macros} Document macroses
+ * @returns {Macros} - Document macros.
*/
Api.prototype["pluginMethod_GetMacros"] = function()
{
@@ -370,11 +373,11 @@
};
/**
- * Set all macroses in document
+ * Sets macros to the document.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias SetMacros
- * @param {Macros} data Document macroses
+ * @param {Macros} data - An object containing the macros data.
*/
Api.prototype["pluginMethod_SetMacros"] = function(data)
{
@@ -382,12 +385,12 @@
};
/**
- * Loader for long operations
+ * Specifies the start action for long operations.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias StartAction
- * @param {number} type Type action: 0 = Information, 1 = BlockInteraction
- * @param {string} description Description text for action
+ * @param {number} type - A value which defines an action type which can take 0 if this is an Information action or 1 if this is a BlockInteraction action.
+ * @param {string} description - A string value that specifies the description text for the start action of the operation.
*/
Api.prototype["pluginMethod_StartAction"] = function(type, description)
{
@@ -395,12 +398,12 @@
};
/**
- * Loader for long operations
+ * Specifies the end action for long operations.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias EndAction
- * @param {number} type Type action: 0 = Information, 1 = BlockInteraction
- * @param {string} description Description text for action
+ * @param {number} type - A value which defines an action type which can take 0 if this is an Information action or 1 if this is a BlockInteraction action.
+ * @param {string} description - A string value that specifies the description text for the operation end action.
*/
Api.prototype["pluginMethod_EndAction"] = function(type, description, status)
{
@@ -448,11 +451,18 @@
};
/**
- * OnEncryption event (for crypto plugins)
+ * Encrypts the document (for crypto plugins).
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias OnEncryption
- * @param {object} obj Properties
+ * @param {object} obj - The encryption properties. This object can have the following values:
+ * * **type** - the type of encrypting operation ("generatePassword" - generates a password for the document, "getPasswordByFile" - sends the password when opening the document, "setPasswordByFile" - sets a password to the document, "encryptData" - encrypts changes when co-editing, "decryptData" - decrypts changes when co-editing),
+ * * **password** - a string value specifying the password to access the document,
+ * * **data** - encrypted/decrypted changes,
+ * * **check** - checks if the encryption/decryption operation is successful or not (used only for "encryptData"/"decryptData" types),
+ * * **docinfo** - an unencrypted part of the encrypted file,
+ * * **hash** - a string value specifying a file hash (sha256 by default),
+ * * **error** - a string value specifying an error that occurs (the "" value means that the operation is successful).
*/
Api.prototype["pluginMethod_OnEncryption"] = function(obj)
{
@@ -515,15 +525,15 @@
};
/**
- * Set properties for editor
- * see {@link https://github.com/ONLYOFFICE/sdkjs-plugins/tree/master/examples/settings examples}
+ * Sets the properties to the document.
+ * See {@link https://github.com/ONLYOFFICE/sdkjs-plugins/tree/master/examples/settings examples}
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias SetProperties
- * @param {object} obj
- * @param {?boolean} obj.copyoutenabled Disable copying from editor if true
- * @param {?boolean} obj.hideContentControlTrack Disable content control track if true
- * @param {?string} obj.watermark_on_draw Watermark in json format
+ * @param {object} obj - Document properties.
+ * @param {?boolean} obj.copyoutenabled - Disables copying from the editor if it is set to true.
+ * @param {?boolean} obj.hideContentControlTrack - Disables tracking the content control if it is set to true.
+ * @param {?string} obj.watermark_on_draw - A string value for watermark in JSON format.
*/
Api.prototype["pluginMethod_SetProperties"] = function(obj)
{
@@ -619,14 +629,14 @@
};
/**
- * Show input helper
+ * Shows the input helper.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias ShowInputHelper
- * @param {string} guid Guid helper
- * @param {number} w Width
- * @param {number} h Height
- * @param {boolean} isKeyboardTake Is catch keyboard
+ * @param {string} guid - A string value which specifies a plugin identifier which must be of the asc.{UUID} type.
+ * @param {number} w - A number which specifies the window width measured in millimeters.
+ * @param {number} h - A number which specifies the window height measured in millimeters.
+ * @param {boolean} isKeyboardTake - Defines if the keyboard is caught (true) or not (false).
*/
Api.prototype["pluginMethod_ShowInputHelper"] = function(guid, w, h, isKeyboardTake)
{
@@ -706,11 +716,12 @@
};
/**
- * Unshow input helper
+ * Unshows the input helper.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias UnShowInputHelper
- * @param {string} guid Guid helper
+ * @param {string} guid - A string value which specifies a plugin identifier which must be of the asc.{UUID} type.
+ * @param {string} isclear - Defines if the input context will be cleared (true) or not (false).
*/
Api.prototype["pluginMethod_UnShowInputHelper"] = function(guid, isclear)
{
@@ -747,11 +758,11 @@
}
};
/**
- * Send message to co-authoring chat.
+ * Sends a message to the co-authoring chat.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias CoAuthoringChatSendMessage
- * @param {string} sText
+ * @param {string} sText - Message text.
*/
Api.prototype["pluginMethod_CoAuthoringChatSendMessage"] = function(sText)
{
@@ -759,16 +770,16 @@
};
/**
- * A current selection type
+ * The current selection type.
* @typedef {("none" | "text" | "drawing" | "slide")} SelectionType
*/
/**
- * Get current selection type
+ * Returns the type of the current selection.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias GetSelectionType
- * @param {SelectionType} selection type
+ * @returns {SelectionType} - The selection type.
*/
Api.prototype["pluginMethod_GetSelectionType"] = function()
{
@@ -858,28 +869,30 @@
return "none";
};
/**
- * Convert doc content to markdown.
+ * Converts a document to Markdown or HTML text.
* @memberof Api
* @typeofeditors ["CDE"]
* @alias ConvertDocument
- * @param {"markdown" | "html"} [sConvertType="markdown"] - type of converting.
- * @param {bool} [bHtmlHeadings=false] - If you have used multiple Heading 1 headings in your Doc, set this param true to demote all heading levels to conform with the following standard: single H1 as title, H2 as top-level heading in the text body.
- * @param {bool} [bBase64img=false] - set this param true if you want images to be created in base64 format.
- * @param {bool} [bDemoteHeadings=false] - Not all Markdown renderers handle Markdown-style IDs. If that is the case for your target platform, set this param true to generate HTML headings and IDs.
- * @param {bool} [bRenderHTMLTags=false] - By default, angle brackets (<) will be replaced by the < entity. If you really want to embed HTML tags in your Markdown, set this param true to preserve them.
- * Or, if you just want to use an occasional HTML tag, you can escape the opening angle bracket like this: \text\.
+ * @param {"markdown" | "html"} [sConvertType="markdown"] - Conversion type ("markdown" or "html").
+ * @param {bool} [bHtmlHeadings=false] - Defines if the HTML headings and IDs will be generated when the Markdown renderer of your target platform does not handle Markdown-style IDs.
+ * @param {bool} [bBase64img=false] - Defines if the images will be created in the base64 format.
+ * @param {bool} [bDemoteHeadings=false] - Defines if all heading levels in your document will be demoted to conform with the following standard: single H1 as title, H2 as top-level heading in the text body.
+ * @param {bool} [bRenderHTMLTags=false] - Defines if HTML tags will be preserved in your Markdown. If you just want to use an occasional HTML tag, you can avoid using the opening angle bracket in the following way: \text\. By default, the opening angle brackets will be replaced with the special characters.
*/
Api.prototype["pluginMethod_ConvertDocument"] = function(sConvertType, bHtmlHeadings, bBase64img, bDemoteHeadings, bRenderHTMLTags)
{
return this.ConvertDocument(sConvertType, bHtmlHeadings, bBase64img, bDemoteHeadings, bRenderHTMLTags);
};
/**
- * Get selection in document in text format
+ * Returns the selected text from the document.
* @memberof Api
* @typeofeditors ["CDE", "CPE", "CSE"]
* @alias GetSelectedText
- * @param {prop} numbering is an option that includes numbering in the return value.
- * @return {string} selected text
+ * @param {prop} numbering - The resulting string display properties:
+ * * **NewLine** - defines if the resulting string will include line boundaries or not,
+ * * **NewLineParagraph** - defines if the resulting string will include paragraph line boundaries or not,
+ * * **Numbering** - defines if the resulting string will include numbering or not.
+ * @return {string} - Selected text.
* @example
* window.Asc.plugin.executeMethod("GetSelectedText", [{NewLine:true, NewLineParagraph:true, Numbering:true}])
*/
@@ -913,14 +926,14 @@
return this.asc_GetSelectedText(false, properties);
};
/**
- * Replaces each paragraph(or text in cell) in the select with the corresponding text from an array of strings.
+ * Replaces each paragraph (or text in cell) in the select with the corresponding text from an array of strings.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias ReplaceTextSmart
- * @param {Array} arrString - represents an array of strings.
- * @param {string} [sParaTab=" "] - specifies which character to use to define the tab in the source text.
- * @param {string} [sParaNewLine=" "] - specifies which character to use to specify the line break character in the source text.
- * @returns {boolean} - always returns true
+ * @param {Array} arrString - An array of replacement strings.
+ * @param {string} [sParaTab=" "] - A character which is used to specify the tab in the source text.
+ * @param {string} [sParaNewLine=" "] - A character which is used to specify the line break character in the source text.
+ * @returns {boolean} - Always returns true.
*/
Api.prototype["pluginMethod_ReplaceTextSmart"] = function(arrString, sParaTab, sParaNewLine)
{
@@ -957,12 +970,12 @@
return true;
};
/**
- * Get the current file to download in the specified format
+ * Returns the current file to download in the specified format.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias GetFileToDownload
- * @param {string} [format=" "] - the format in which you need to get the file to download.
- * @returns {string} - url to download the file in the specified format or error.
+ * @param {string} [format=" "] - The format in which you need to download the file.
+ * @returns {string} - URL to download the file in the specified format or error.
*/
Api.prototype["pluginMethod_GetFileToDownload"] = function(format)
{
diff --git a/common/plugins/plugin_base_api.js b/common/plugins/plugin_base_api.js
index dba654a779..fe2540b133 100644
--- a/common/plugins/plugin_base_api.js
+++ b/common/plugins/plugin_base_api.js
@@ -39,74 +39,89 @@ window.startPluginApi = function() {
*/
/**
- * Object for translations
- * example: { "en" : "name", "ru" : "имя" }
+ * Translations for the text field. The object keys are the two letter language codes (ru, de, it, etc.) and the values are the button label translation for each language.
+ * Example: { "en" : "name", "ru" : "имя" }
* @typedef { Object. } localeTranslate
*/
/**
- * EditorType
+ * The editors which the plugin is available for:
+ * * **"word"** - text document editor,
+ * * **"cell"** - spreadsheet editor,
+ * * **"slide"** - presentation editor.
* @typedef {("word" | "cell" | "slide")} editorType
* */
/**
- * Variation init data type
- * @typedef {("none" | "text" | "ole" | "html")} initDataType
+ * The data type selected in the editor and sent to the plugin:
+ * * **"text"** - the text data,
+ * * **"html"** - HTML formatted code,
+ * * **"ole"** - OLE object data,
+ * * **"desktop"** - the desktop editor data,
+ * * **"destop-external"** - the main page data of the desktop app (system messages),
+ * * **"none"** - no data will be send to the plugin from the editor.
+ * @typedef {("text" | "html" | "ole" | "desktop" | "destop-external" | "none")} initDataType
* */
/**
+ * The skinnable plugin button used in the plugin interface (used for visual plugins with their own window only, i.e. isVisual == true && isInsideMode == false).
* @typedef { Object } variationButton
- * @property {string} text Label
- * @property {boolean} [primary] Is button use primary css style
- * @proverty {boolean} [isViewer] Is button shown in viewer mode
- * @property {localeTranslate} [textLocale] Translations for text field
+ * @property {string} text - The label which is displayed on the button.
+ * @property {boolean} [primary] - Defines if the button is primary or not. The primary flag affects the button skin only.
+ * @proverty {boolean} [isViewer] - Defines if the button is shown in the viewer mode only or not.
+ * @property {localeTranslate} [textLocale] - Translations for the text field. The object keys are the two letter language codes (ru, de, it, etc.) and the values are the button label translation for each language.
*/
/**
+ * Plugin variations, or subplugins, that are created inside the origin plugin.
* @typedef { Object } variation
- * @description Why would one plugin might need some variations? The answer is simple enough: the plugin can not only perform some actions but also contain some settings, or 'About' window, or something like that. For example, translation plugin: the plugin itself does not need a visual window for translation as it can be done just pressing a single button, but its settings (the translation direction) and 'About' window must be visual. So we will need to have at least two plugin variations (translation itself and settings), or three, in case we want to add an 'About' window with the information about the plugin and its authors or the software used for the plugin creation.
+ * @description Plugin variations can be created for the following purposes:
+ * * to perform the main plugin actions,
+ * * to contain plugin settings,
+ * * to display an About window, etc.
+ * For example, the Translation plugin: the plugin itself does not need a visual window for translation as it can be done just pressing a single button, but its settings (the translation direction) and an 'About' window must be visual. So we will need to have at least two plugin variations (translation itself and settings), or three, in case we want to add an 'About' window with the information about the plugin and its authors or the software used for the plugin creation.
*
- * @property {string} description Name
- * @property {localeTranslate} [descriptionName] Translations for description field
+ * @property {string} description - The description, i.e. what describes your plugin the best way.
+ * @property {localeTranslate} [descriptionLocale] - Translations for the description field. The object keys are the two letter language codes (ru, de, it, etc.) and the values are the plugin description translation for each language.
*
- * @property {string} url Plugin entry point, i.e. HTML file which connects the plugin.js (the base file needed for work with plugins) file and launches the plugin code.
+ * @property {string} url - Plugin entry point, i.e. an HTML file which connects the plugin.js file (the base file needed for work with plugins) and launches the plugin code.
*
- * @proverty {string[]} icons Plugin icon image files used in the editors: for common screens and with doubled resolution for retina screens.
+ * @proverty {string[]} icons - Plugin icon image files used in the editors. There can be several scaling types for plugin icons: 100%, 125%, 150%, 175%, 200%, etc.
*
- * @property {boolean} isViewer=false Specifies if the plugin is available when the document is available in viewer mode only or not.
- * @property {editorType[]} EditorsSupport=Array.("word","cell","slide") The editors which the plugin is available for ("word" - text document editor, "cell" - spreadsheet editor, "slide" - presentation editor).
+ * @property {boolean} [isViewer=false] - Specifies if the plugin is working when the document is available in the viewer mode only or not.
+ * @property {editorType[]} [EditorsSupport=Array.("word","cell","slide")] - The editors which the plugin is available for ("word" - text document editor, "cell" - spreadsheet editor, "slide" - presentation editor).
*
- * @property {boolean} isVisual Specifies if the plugin is visual (will open a window for some action, or introduce some additions to the editor panel interface) or non-visual (will provide a button (or buttons) which is going to apply some transformations or manipulations to the document).
- * @property {boolean} isModal Specifies if the opened plugin window is modal (used for visual plugins only, and if isInsideMode is not true).
- * @property {boolean} isInsideMode Specifies if the plugin must be displayed inside the editor panel instead of its own window.
- * @property {boolean} [isSystem] Specifies if the plugin is not displayed in the editor interface and is started in background with the server (or desktop editors start) not interfering with the other plugins, so that they can work simultaneously.
- * @property {boolean} [isDisplayedInViewer] Specifies if the plugin will be displayed in viewer mode as well as in editor mode (isDisplayedInViewer == true) or in the editor mode only (isDisplayedInViewer == false).
+ * @property {boolean} isVisual - Specifies if the plugin is visual (will open a window for some action, or introduce some additions to the editor panel interface) or non-visual (will provide a button (or buttons) which is going to apply some transformations or manipulations to the document).
+ * @property {boolean} isModal - Specifies if the opened plugin window is modal (used for visual plugins only, and if isInsideMode is not true).
+ * @property {boolean} isInsideMode - Specifies if the plugin must be displayed inside the editor panel instead of its own window.
+ * @property {boolean} isSystem - Specifies if the plugin is not displayed in the editor interface and is started in the background with the server (or desktop editors start) not interfering with the other plugins, so that they can work simultaneously.
+ * @property {boolean} isDisplayedInViewer - Specifies if the plugin will be displayed in the viewer mode as well as in the editor mode (isDisplayedInViewer == true) or in the editor mode only (isDisplayedInViewer == false).
*
- * @property {boolean} [initOnSelectionChanged] Specifies if the plugin watches the text selection events in the editor window.
+ * @property {boolean} initOnSelectionChanged - Specifies if the plugin watches the text selection events in the editor window.
*
- * @property {boolean} [isUpdateOleOnResize] Specifies if the OLE object must be redrawn when resized in the editor using the vector object draw type or not (used for OLE objects only, i.e. initDataType == "ole").
+ * @property {boolean} isUpdateOleOnResize - Specifies if an OLE object must be redrawn when resized in the editor using the vector object draw type or not (used for OLE objects only, i.e. initDataType == "ole").
*
- * @property {initDataType} initDataType The data type selected in the editor and sent to the plugin: "text" - the text data, "html" - HTML formatted code, "ole" - OLE object data, "none" - no data will be send to the plugin from the editor.
- * @property {string} initData Is always equal to "" - this is the data which is sent from the editor to the plugin at the plugin start (e.g. if initDataType == "text", the plugin will receive the selected text when run).
+ * @property {initDataType} initDataType - The data type selected in the editor and sent to the plugin: "text" - the text data, "html" - HTML formatted code, "ole" - OLE object data, "desktop" - the desktop editor data, "destop-external" - the main page data of the desktop app (system messages), "none" - no data will be send to the plugin from the editor.
+ * @property {string} initData - Is usually equal to "" - this is the data which is sent from the editor to the plugin at the plugin start (e.g. if initDataType == "text", the plugin will receive the selected text when run). It may also be equal to encryption in the encryption plugins.
*
- * @property {number[]} [size] Size of the plugin window
+ * @property {number[]} [size] - Plugin window size.
*
- * @property {variationButton[]} [buttons] Buttons
+ * @property {variationButton[]} [buttons] - The list of skinnable plugin buttons used in the plugin interface (used for visual plugins with their own window only, i.e. isVisual == true && isInsideMode == false).
*
- * @property {string[]} events Events
+ * @property {string[]} events - Plugin events.
*/
/**
* @typedef {Object} Config
- * @property {string} basePath="" Path to the plugin. All the other paths are calculated relative to this path. In case the plugin is installed on the server, an additional parameter (path to the plugins) is added there. If baseUrl == "" the path to all plugins will be used.
- * @property {string} guid Plugin identifier. It must be of the asc.{UUID} type.
- * @property {string} [minVersion] The minimum supported editors version.
+ * @property {string} [basePath=""] - Path to the plugin. All the other paths are calculated relative to this path. In case the plugin is installed on the server, an additional parameter (path to the plugins) is added there. If baseUrl == "", the path to all plugins will be used.
+ * @property {string} guid - Plugin identifier. It must be of the asc.{UUID} type.
+ * @property {string} minVersion - The minimum supported editors version.
*
- * @property {string} name Plugin name which will be visible at the plugin toolbar.
- * @property {localeTranslate} [nameLocale] Translations for name field
+ * @property {string} name - Plugin name which will be visible at the plugin toolbar.
+ * @property {localeTranslate} [nameLocale] - Translations for the name field. The object keys are the two letter language codes (ru, de, it, etc.) and the values are the plugin name translation for each language.
*
- * @property {variation[]} variations Plugin variations or "subplugins"
+ * @property {variation[]} variations - Plugin variations, or subplugins, that are created inside the origin plugin.
*/
/***********************************************************************
@@ -129,7 +144,8 @@ window.startPluginApi = function() {
* @event Plugin#init
* @memberof Plugin
* @alias init
- * @param {string} text
+ * @description The function called when the plugin is launched. It defines the data sent to the plugin describing what actions are to be performed and how they must be performed.
+ * @param {string} text - Defines the data parameter that depends on the initDataType setting specified in the config.json file.
*/
/**
@@ -137,8 +153,8 @@ window.startPluginApi = function() {
* @event Plugin#button
* @memberof Plugin
* @alias button
- * @description The method invokes pressing of a button in a window with a plugin. The button is an index in the list (see config.json).
- * @param {number} buttonIndex
+ * @description The function called when any of the plugin buttons is clicked. It defines the buttons used with the plugin and the plugin behavior when they are clicked.
+ * @param {number} buttonIndex - Defines the button index in the buttons array of the config.json file. If id == -1, then the plugin considers that the Close window cross button has been clicked or its operation has been somehow interrupted.
*/
/**
@@ -146,6 +162,7 @@ window.startPluginApi = function() {
* @event Plugin#event_onTargetPositionChanged
* @memberof Plugin
* @alias event_onTargetPositionChanged
+ * @description The function called when the target position in the editor is changed.
*/
/**
@@ -153,6 +170,7 @@ window.startPluginApi = function() {
* @event Plugin#event_onDocumentContentReady
* @memberof Plugin
* @alias event_onDocumentContentReady
+ * @description The function called when the document is completely loaded.
*/
/**
@@ -160,6 +178,8 @@ window.startPluginApi = function() {
* @event Plugin#event_onClick
* @memberof Plugin
* @alias event_onClick
+ * @description The function called when the user clicks on the element.
+ * @param {boolean} isSelectionUse - Defines if the selection is used or not.
*/
/**
@@ -167,6 +187,8 @@ window.startPluginApi = function() {
* @event Plugin#event_inputHelper_onSelectItem
* @memberof Plugin
* @alias event_inputHelper_onSelectItem
+ * @description The function called when the user is trying to select an item from the input helper.
+ * @param {object} item - Defines the selected item: "text" - the item text, "id" - the item index.
*/
/**
@@ -174,6 +196,7 @@ window.startPluginApi = function() {
* @event Plugin#event_onInputHelperClear
* @memberof Plugin
* @alias event_onInputHelperClear
+ * @description The function called when the user is trying to clear the text and the input helper disappears.
*/
/**
@@ -181,6 +204,8 @@ window.startPluginApi = function() {
* @event Plugin#event_onInputHelperInput
* @memberof Plugin
* @alias event_onInputHelperInput
+ * @description The function called when the user is trying to input the text and the input helper appears.
+ * @param {object} data - Defines the text which the user inputs: "add" - defines if the text is added to the current text (true) or this is the beginning of the text (false), "text" - the text which the user inputs.
*/
/**
@@ -188,6 +213,7 @@ window.startPluginApi = function() {
* @event Plugin#onTranslate
* @memberof Plugin
* @alias onTranslate
+ * @description The function called right after the plugin startup or later in case the plugin language is changed.
*/
/**
@@ -195,8 +221,8 @@ window.startPluginApi = function() {
* @event Plugin#onEnableMouseEvent
* @memberof Plugin
* @alias onEnableMouseEvent
- * @description The method turns off/on mouse/touchpad events.
- * @param {boolean} isEnabled
+ * @description The function called to turn the mouse or touchpad events on/off.
+ * @param {boolean} isEnabled - Defines if the mouse or touchpad is enabled (true) or not (false).
*/
/**
@@ -204,7 +230,7 @@ window.startPluginApi = function() {
* @event Plugin#onExternalMouseUp
* @memberof Plugin
* @alias onExternalMouseUp
- * @description The method indicates that the mouse/touchpad event was completed outside the plugin while started inside the plugin.
+ * @description The function called when the mouse button is released outside the plugin iframe.
*/
/**
@@ -212,8 +238,8 @@ window.startPluginApi = function() {
* @event Plugin#onExternalPluginMessage
* @memberof Plugin
* @alias onExternalPluginMessage
- * @description The method shows the editor integrator message (see externallistener plugin).
- * @param {Object} data
+ * @description The function called to show the editor integrator message.
+ * @param {Object} data - Defines the editor integrator message: "type" - the message type, "text" - the message text.
*/
@@ -228,16 +254,22 @@ window.startPluginApi = function() {
* @memberof Plugin
* @alias executeCommand
* @deprecated Please use callCommand method.
- * @description THE METHOD IS OBSOLETE. Use window.Asc.plugin.callCommand which runs the code from "data" string parameter.
- * After the code is executed, callback is called. If callback === undefined,
- * then window.Asc.plugin.onCommandCallback is called in case it is implemented in the plugin.
- * Script in the "data" variable is a builder script (see documentation LINK).
- * Сurrently, it is allowed to insert content created with the help of builder methods
- * only with InsertContent method, for the plugin not to handle images/fonts loading (as they are handled in the editor asynchronously).
- * In the future this restriction will be eliminated.
- * @param {string} type "close" or "command"
- * @param {string} data Script code
- * @param {Function} callback
+ * @description Defines the method used to send the data back to the editor.
+ * This method is deprecated, please use the callCommand method which runs the code from the data string parameter.
+ * Now this method is mainly used to work with the OLE objects or close the plugin without any other commands.
+ * It is also retained for using with text so that the previous versions of the plugin remain compatible.
+ * The callback is the result that the command returns. It is an optional parameter. In case it is missing, the window.Asc.plugin.onCommandCallback function will be used to return the result of the command execution.
+ * The second parameter is the JavaScript code for working with ONLYOFFICE Document Builder API
+ * that allows the plugin to send structured data inserted to the resulting document file (formatted paragraphs, tables, text parts and separate words, etc.).
+ * ONLYOFFICE Document Builder commands can be only used to create content and insert it to the document editor
+ * (using the Api.GetDocument().InsertContent(...)). This limitation exists due to the co-editing feature in the online editors.
+ * If it is necessary to create a plugin for the desktop editors to work with local files, no such limitation is applied.
+ * @param {string} type - Defines the type of the command. The "close" is used to close the plugin window after executing the function in the data parameter.
+ * The "command" is used to execute the command and leave the window open waiting for the next command.
+ * @param {string} data - Defines the command written in JavaScript code which purpose is to form the structured data which can be inserted to the resulting document file
+ * (formatted paragraphs, tables, text parts and separate words, etc.). Then the data is sent to the editors.
+ * The command must be compatible with ONLYOFFICE Document Builder syntax.
+ * @param {Function} callback - The result that the method returns.
*/
Plugin.executeCommand = function(type, data, callback)
{
@@ -262,12 +294,11 @@ window.startPluginApi = function() {
* executeMethod
* @memberof Plugin
* @alias executeMethod
- * @description The function calls the editor method.
- * After execution of the function, callback with a parameter is called - the value returned by the method. If callback === undefined,
- * then window.Asc.plugin.onMethodReturn with a parameter is called - the value returned by the method in case it is implemented in the plugin.
- * @param {string} name Name of the method
- * @param {Array} params Array with calling parameters
- * @param {Function} callback Callback function
+ * @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.
+ * @param {string} name - The name of the specific method that must be executed.
+ * @param {Array} params - The arguments that the method in use has (if it has any).
+ * @param {Function} callback - The result that the method returns.
*/
Plugin.executeMethod = function(name, params, callback)
{
@@ -304,14 +335,13 @@ window.startPluginApi = function() {
* resizeWindow (only for visual modal plugins)
* @memberof Plugin
* @alias resizeWindow
- * @description The funcion is intended for visual modal plugins -
- * it changes the window size updating the minimum/maximum sizes
- * @param {number} width New width of the window
- * @param {number} height New height of the window
- * @param {number} minW New min-width of the window
- * @param {number} minH New min-height of the window
- * @param {number} maxW New max-width of the window
- * @param {number} maxH New max-height of the window
+ * @description Defines the method used to change the window size updating the minimum/maximum sizes.
+ * @param {number} width - The window width.
+ * @param {number} height - The window height.
+ * @param {number} minW - The window minimum width.
+ * @param {number} minH - The window minimum height.
+ * @param {number} maxW - The window maximum width.
+ * @param {number} maxH - The window maximum height.
*/
Plugin.resizeWindow = function(width, height, minW, minH, maxW, maxH)
{
@@ -341,23 +371,23 @@ window.startPluginApi = function() {
* callCommand
* @memberof Plugin
* @alias callCommand
- * @description The method performs the "func" function.
- * After that callback is called. If callback === undefined,
- * then window.Asc.plugin.onCommandCallback is called, in case it is executed in the plugin
- * if isClose === true, then after the plugin is executed, it will close.
- * if isCalc === false, then the editor will not recalculate the document (use this parameter carefully -
- * only when you are sure that your edits will not require document recalculation)
- * Code in the "func" function is a builder script (see documentation LINK)
- * Currently, it is allowed to insert content created with the help of builder methods
- * only with InsertContent method, for the plugin not to handle images/fonts loading (as they are run in the editor asynchronously)
- * In the future this restriction will be eliminated
- *
- * Note: in the "func" code it is not allowed to use external plugin variables.
- * If it is necessary, you need to export the variable in Asc.scope object, and use it the function code
- * @param {Function} func Function to call
- * @param {boolean} isClose
- * @param {boolean} isCalc
- * @param {Function} callback Callback function
+ * @description Defines the method used to send the data back to the editor.
+ * It replaces the executeCommand method when working with texts in order to simplify the syntax of the script that is necessary to pass to the editors using ONLYOFFICE Document Builder API.
+ * It allows the plugin to send structured data that can be inserted to the resulting document file (formatted paragraphs, tables, text parts and separate words, etc.).
+ * The callback is the result that the command returns. It is an optional parameter. In case it is missing, the window.Asc.plugin.onCommandCallback function will be used to return the result of the command execution.
+ * ONLYOFFICE Document Builder commands can be only used to create content and insert it to the document editor (using the Api.GetDocument().InsertContent(...)).
+ * This limitation exists due to the co-editing feature in the online editors. If it is necessary to create a plugin for desktop editors to work with local files, no such limitation is applied.
+ * This method is executed in its own context isolated from other JavaScript data. If some parameters or other data need to be passed to this method, use Asc.scope object.
+ * @param {Function} func - Defines the command written in JavaScript which purpose is to form structured data which can be inserted to the resulting document file
+ * (formatted paragraphs, tables, text parts and separate words, etc.). Then the data is sent to the editors.
+ * The command must be compatible with ONLYOFFICE Document Builder syntax.
+ * @param {boolean} isClose - Defines whether the plugin window must be closed after the code is executed or left open waiting for another command or action.
+ * The true value is used to close the plugin window after executing the function in the func parameter.
+ * The false value is used to execute the command and leave the window open waiting for the next command.
+ * @param {boolean} isCalc - Defines whether the document will be recalculated or not.
+ * The true value is used to recalculate the document after executing the function in the func parameter.
+ * The false value will not recalculate the document (use it only when your edits surely will not require document recalculation).
+ * @param {Function} callback - The result that the method returns.
*/
Plugin.callCommand = function(func, isClose, isCalc, callback)
{
@@ -371,12 +401,12 @@ window.startPluginApi = function() {
* callModule
* @memberof Plugin
* @alias callModule
- * @description The function executes a remotely located script following a link.
- * After the execution callback is called, if it is not undefined.
- * If isClose === true, then after execution the plugin will close.
- * @param {string} url Url to resource code
- * @param {Function} callback Callback function
- * @param {boolean} isClose
+ * @description Defines the method used to execute a remotely located script following a link.
+ * @param {string} url - The resource code url.
+ * @param {Function} callback - The result that the method returns.
+ * @param {boolean} isClose - Defines whether the plugin window must be closed after the code is executed or left open waiting for another action.
+ * The true value is used to close the plugin window after executing a remotely located script.
+ * The false value is used to execute the code and leave the window open waiting for the next action.
*/
Plugin.callModule = function(url, callback, isClose)
{
@@ -401,10 +431,9 @@ window.startPluginApi = function() {
* loadModule
* @memberof Plugin
* @alias loadModule
- * @description The function allows to load a text resource located remotely on a link.
- * After the execution callback is called with resource content if it is not undefined.
- * @param {string} url Url to resource code
- * @param {Function} callback Callback function
+ * @description Defines the method used to load a remotely located text resource.
+ * @param {string} url - The resource code url.
+ * @param {Function} callback - The result that the method returns.
*/
Plugin.loadModule = function(url, callback)
{
@@ -427,8 +456,9 @@ window.startPluginApi = function() {
/**
* @typedef {Object} InputHelperItem
- * @property {string} id
- * @property {string} text
+ * @description Defines the input helper item.
+ * @property {string} id - The item index.
+ * @property {string} text - The item text.
*/
/**
@@ -442,12 +472,14 @@ window.startPluginApi = function() {
* @function createWindow
* @memberof InputHelper
* @alias createWindow
+ * @description The function called to create an input helper window.
*/
/**
* @function getItems
* @memberof InputHelper
* @alias getItems
+ * @description The function called to return an array of the InputHelperItem objects that contain all the items from the input helper.
* @return {InputHelperItem[]}
*/
@@ -455,28 +487,32 @@ window.startPluginApi = function() {
* @function setItems
* @memberof InputHelper
* @alias setItems
- * @param {InputHelperItem[]}
+ * @description The function called to set the items to the input helper.
+ * @param {InputHelperItem[]} - Defines an array of the InputHelperItem objects which contain all the items for the input helper.
*/
/**
* @function show
* @memberof InputHelper
* @alias show
- * @param {number} width
- * @param {number} height
- * @param {boolean} isCaptureKeyboard
+ * @description The function called to show an input helper.
+ * @param {number} width - The input helper window width measured in millimeters.
+ * @param {number} height - The input helper window height measured in millimeters.
+ * @param {boolean} isCaptureKeyboard - Defines if the keyboard is caught (true) or not (false).
*/
/**
* @function unShow
* @memberof InputHelper
* @alias unShow
+ * @description The function called to hide an input helper.
*/
/**
* @function getScrollSizes
* @memberof InputHelper
* @alias getScrollSizes
+ * @description The function called to get the sizes of the input helper scrolled window. Returns an object with width and height parameters.
* @return {number}
*/
@@ -484,6 +520,7 @@ window.startPluginApi = function() {
* createInputHelper
* @memberof Plugin
* @alias createInputHelper
+ * @description Defines the method used to create an input helper - a window that appears and disappears when you type text. Its location is tied to the cursor.
*/
Plugin.createInputHelper = function()
{
@@ -493,6 +530,7 @@ window.startPluginApi = function() {
* getInputHelper
* @memberof Plugin
* @alias getInputHelper
+ * @description Defines the method used to get the InputHelper object.
* @return {InputHelper} Input helper object
*/
Plugin.getInputHelper = function()
diff --git a/word/api_plugins.js b/word/api_plugins.js
index d67a5202eb..11da0fd11a 100644
--- a/word/api_plugins.js
+++ b/word/api_plugins.js
@@ -127,7 +127,7 @@
return this.asc_GetBlockChainData();
};
/**
- * Inserts a content control containing data. The data is specified by the js code for Document Builder, or by a link to the shared document.
+ * Inserts the content control containing data. The data is specified by the js code for Document Builder, or by a link to the shared document.
* @memberof Api
* @typeofeditors ["CDE"]
* @alias InsertAndReplaceContentControls
@@ -541,7 +541,7 @@
* @memberof Api
* @typeofeditors ["CDE"]
* @alias AddContentControl
- * @param {ContentControlType} type - A numeric value that specifies the content control type. It can have one of the following values: 1 (block) or 2 (inline).
+ * @param {ContentControlType} type - A numeric value that specifies the content control type. It can have one of the following values: 1 (block), 2 (inline), 3 (row) or 4 (cell).
* @param {ContentControlProperties} [commonPr = {}] - The common content control properties.
* @returns {ContentControl} - A JSON object containing the data about the created content control: "Tag", "Id", "Lock" and "InternalId".
* @example
@@ -735,7 +735,7 @@
* Removes several OLE objects from the document by their internal IDs.
* @memberof Api
* @typeofeditors ["CDE"]
- * @alias RemoveContentControls
+ * @alias RemoveOleObjects
* @param {OLEObjectData[]} arrObjects An array of the identifiers which are used to work with OLE objects added to the document. Example: [{"InternalId": "5_556"}].
* @return {undefined}
* @example
@@ -781,7 +781,7 @@
* @typeofeditors ["CDE"]
* @alias InsertOleObject
* @param {OLEObjectData} NewObject - The new OLE object data.
- * @param {?boolean} bSelect - Defines if the OLE object will be selected after inserting to the document (true) or not (false).
+ * @param {?boolean} bSelect - Defines if the OLE object will be selected after inserting into the document (true) or not (false).
* @return {undefined}
*/
window["asc_docs_api"].prototype["pluginMethod_InsertOleObject"] = function(NewObject, bSelect)