updated plugin api descriptions

This commit is contained in:
Natalia
2022-11-14 12:59:41 +03:00
parent a9365fd7e3
commit 4e24e0cd73

View File

@ -35,11 +35,31 @@
(function(window)
{
/**
* Returns information about all the forms that have been added to the document
* @typedef {Object} ContentControl
* Content control object.
* @property {string} Tag - A tag assigned to the content control. The same tag can be assigned to several content controls so that it is possible to make reference to them in your code.
* @property {string} Id - A unique identifier of the content control. It can be used to search for a certain content control and make reference to it in the code.
* @property {ContentControlLock} Lock - A value that defines if it is possible to delete and/or edit the content control or not: 0 - only deleting, 1 - no deleting or editing, 2 - only editing, 3 - full access.
* @property {string} InternalId - A unique internal identifier of the content control. It is used for all operations with content controls.
*/
/**
* @typedef {(0 | 1 | 2 | 3)} ContentControlLock
* <p>A value that defines if it is possible to delete and/or edit the content control or not:</p>
* <ul>
* <li><b>0</b> - only deleting</li>
* <li><b>1</b> - disable deleting or editing</li>
* <li><b>2</b> - only editing</li>
* <li><b>3</b> - full access</li>
* </ul>
*/
/**
* Returns information about all the forms that have been added to the document.
* @memberof Api
* @typeofeditors ["CDE"]
* @alias GetAllForms
* @returns {[]} - An array of forms
* @returns {ContentControl[]} - An array with all the forms from the document.
* @example
* window.Asc.plugin.executeMethod("GetAllForms");
*/
@ -58,12 +78,12 @@
return arrResult;
};
/**
* Returns information about all the forms that have been added to the document with specified Tag
* Returns information about all the forms that have been added to the document with specified tag.
* @memberof Api
* @typeofeditors ["CDE"]
* @alias GetFormsByTag
* @param {string} tag - Tag of the form
* @returns {[]} - An array of forms
* @param {string} tag - The form tag.
* @returns {ContentControl[]} - An array with all the forms from the document with the specified tag.
* @example
* window.Asc.plugin.executeMethod("GetFormsByTag");
*/
@ -85,12 +105,12 @@
return arrResult;
};
/**
* Set value for specified form
* Sets a value to the specified form.
* @memberof Api
* @typeofeditors ["CDE"]
* @alias SetFormValue
* @param {string} internalId - A unique internal identifier of the content control.
* @param {*} value - Depends on the type of a form
* @param {string} internalId - A unique internal identifier of the form.
* @param {string | boolean} value - Form value to be set. Its type depends on the form type.
* @example
* window.Asc.plugin.executeMethod("SetFormValue");
*/
@ -195,12 +215,12 @@
oLogicDocument.FinalizeAction();
};
/**
* Get form value
* Returns a value of the specified form.
* @memberof Api
* @typeofeditors ["CDE"]
* @alias GetFormValue
* @param {string} internalId - A unique internal identifier of the content control.
* @returns {null | string} Value of the form (null means the form is filled with a placeholder)
* @param {string} internalId - A unique internal identifier of the form.
* @returns {null | string | boolean} The form value in the string or boolean format depending on the form type. The null value means that the form is filled with a placeholder.
* @example
* window.Asc.plugin.executeMethod("GetFormValue");
*