mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-04-07 14:09:12 +08:00
[all] Events description
This commit is contained in:
@ -42,6 +42,14 @@
|
||||
|
||||
var Api = window["Asc"]["spreadsheet_api"];
|
||||
|
||||
/**
|
||||
* @typedef {Object} comment
|
||||
* Comment object.
|
||||
* @property {string} Id - The comment ID.
|
||||
* @property {CommentData} Data - An object which contains the comment data.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Enumeration/comment.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} CommentData
|
||||
* The comment data.
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
* @alias onClick
|
||||
* @description The function called when the user clicks on the element.
|
||||
* @param {boolean} isSelectionUse - Defines if the selection is used or not.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Methods/onClick.js
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Events/onClick.js
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -48,7 +48,7 @@
|
||||
* @memberof Plugin
|
||||
* @alias onTargetPositionChanged
|
||||
* @description The function called when the target position in the editor is changed.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Methods/onTargetPositionChanged.js
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Events/onTargetPositionChanged.js
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -57,7 +57,7 @@
|
||||
* @memberof Plugin
|
||||
* @alias onDocumentContentReady
|
||||
* @description The function called when the document is completely loaded.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Methods/onDocumentContentReady.js
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Events/onDocumentContentReady.js
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -67,7 +67,7 @@
|
||||
* @alias onEnableMouseEvent
|
||||
* @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**).
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Methods/onEnableMouseEvent.js
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Events/onEnableMouseEvent.js
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -76,5 +76,16 @@
|
||||
* @memberof Plugin
|
||||
* @alias onExternalMouseUp
|
||||
* @description The function called when the mouse button is released outside the plugin iframe.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Methods/onExternalMouseUp.js
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Events/onExternalMouseUp.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* Event: onChangeRestrictions
|
||||
* @event Plugin#onChangeRestrictions
|
||||
* @memberof Plugin
|
||||
* @alias onChangeRestrictions
|
||||
* @description The function called when the restrictions in the editor is changed.
|
||||
* @param {number} value - restrictions value.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Events/onChangeRestrictions.js
|
||||
*/
|
||||
|
||||
|
||||
@ -78,46 +78,6 @@ window.startPluginApi = function() {
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Enumeration/Button.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @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 you can make reference to them in your code.
|
||||
* @property {string} Id - A unique content control identifier. It can be used to search for a certain content control and make reference to it in your code.
|
||||
* @property {ContentControlLock} Lock - A value that defines if it is possible to delete and/or edit the content control or not.
|
||||
* @property {string} InternalId - A unique internal identifier of the content control. It is used for all operations with content controls.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Enumeration/ContentControl.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {(0 | 1 | 2 | 3)} ContentControlLock
|
||||
* A value that defines if it is possible to delete and/or edit the content control or not:
|
||||
* <b>0</b> - only deleting,
|
||||
* <b>1</b> - disable deleting or editing,
|
||||
* <b>2</b> - only editing,
|
||||
* <b>3</b> - full access.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Enumeration/ContentControlLock.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} comment
|
||||
* Comment object.
|
||||
* @property {string} Id - The comment ID.
|
||||
* @property {CommentData} Data - An object which contains the comment data.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Enumeration/comment.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} CommentData
|
||||
* The comment data.
|
||||
* @property {string} UserName - The comment author.
|
||||
* @property {string} Text - The comment text.
|
||||
* @property {string} Time - The time when the comment was posted (in milliseconds).
|
||||
* @property {boolean} Solved - Specifies if the comment is resolved (**true**) or not (**false**).
|
||||
* @property {CommentData[]} Replies - An array containing the comment replies represented as the *CommentData* object.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Enumeration/CommentData.js
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Plugin variations, or subplugins, that are created inside the origin plugin.
|
||||
* @typed { Object } variation
|
||||
|
||||
@ -43,6 +43,14 @@
|
||||
|
||||
var Api = window["asc_docs_api"];
|
||||
|
||||
/**
|
||||
* @typedef {Object} comment
|
||||
* Comment object.
|
||||
* @property {string} Id - The comment ID.
|
||||
* @property {CommentData} Data - An object which contains the comment data.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Enumeration/comment.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} CommentData
|
||||
* The comment data.
|
||||
|
||||
@ -32,6 +32,45 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* @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 you can make reference to them in your code.
|
||||
* @property {string} Id - A unique content control identifier. It can be used to search for a certain content control and make reference to it in your code.
|
||||
* @property {ContentControlLock} Lock - A value that defines if it is possible to delete and/or edit the content control or not.
|
||||
* @property {string} InternalId - A unique internal identifier of the content control. It is used for all operations with content controls.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Enumeration/ContentControl.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {(0 | 1 | 2 | 3)} ContentControlLock
|
||||
* A value that defines if it is possible to delete and/or edit the content control or not:
|
||||
* <b>0</b> - only deleting,
|
||||
* <b>1</b> - disable deleting or editing,
|
||||
* <b>2</b> - only editing,
|
||||
* <b>3</b> - full access.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Enumeration/ContentControlLock.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} comment
|
||||
* Comment object.
|
||||
* @property {string} Id - The comment ID.
|
||||
* @property {CommentData} Data - An object which contains the comment data.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Enumeration/comment.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} CommentData
|
||||
* The comment data.
|
||||
* @property {string} UserName - The comment author.
|
||||
* @property {string} Text - The comment text.
|
||||
* @property {string} Time - The time when the comment was posted (in milliseconds).
|
||||
* @property {boolean} Solved - Specifies if the comment is resolved (**true**) or not (**false**).
|
||||
* @property {CommentData[]} Replies - An array containing the comment replies represented as the *CommentData* object.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Enumeration/CommentData.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* COMMENTS
|
||||
*/
|
||||
@ -42,9 +81,9 @@
|
||||
* @memberof Plugin
|
||||
* @typeofeditors ["CDE"]
|
||||
* @alias onAddComment
|
||||
* @description The function called when a comment is added to the document with the {@link /plugin/executeMethod/text/addcomment AddComment} method.
|
||||
* @description The function called when a comment is added to the document with the {@link /plugins/methods/text-document-api/Api/Methods/AddComment AddComment} method.
|
||||
* @param {comment} comment - Defines the comment object containing the comment data.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Methods/onAddComment.js
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Events/onAddComment.js
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -53,9 +92,9 @@
|
||||
* @memberof Plugin
|
||||
* @typeofeditors ["CDE"]
|
||||
* @alias onChangeCommentData
|
||||
* @description The function called when the specified comment is changed with the {@link /plugin/executeMethod/text/changecomment ChangeComment} method.
|
||||
* @description The function called when the specified comment is changed with the {@link /plugins/methods/text-document-api/Api/Methods/ChangeComment ChangeComment} method.
|
||||
* @param {comment} comment - Defines the comment object containing the comment data.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Methods/onChangeCommentData.js
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Events/onChangeCommentData.js
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -64,9 +103,9 @@
|
||||
* @memberof Plugin
|
||||
* @typeofeditors ["CDE"]
|
||||
* @alias onRemoveComment
|
||||
* @description The function called when the specified comment is removed with the {@link /plugin/executeMethod/text/removecomments RemoveComments} method.
|
||||
* @description The function called when the specified comment is removed with the {@link /plugins/methods/text-document-api/Api/Methods/RemoveComments RemoveComments} method.
|
||||
* @param {comment} comment - Defines the comment object containing the comment data.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Methods/onRemoveComment.js
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Events/onRemoveComment.js
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -80,7 +119,7 @@
|
||||
* @typeofeditors ["CDE"]
|
||||
* @alias onSubmitForm
|
||||
* @description The function called when the user clicks the "Complete & Submit" button.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Methods/onSubmitForm.js
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Events/onSubmitForm.js
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -95,7 +134,7 @@
|
||||
* @alias onFocusContentControl
|
||||
* @description The function called to show which content control has been focused.
|
||||
* @param {ContentControl} control - Defines the content control that has been focused.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Methods/onFocusContentControl.js
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Events/onFocusContentControl.js
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -106,7 +145,7 @@
|
||||
* @alias onBlurContentControl
|
||||
* @description The function called to show which content control has been blurred.
|
||||
* @param {ContentControl} control - Defines the content control that has been blurred.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Methods/onBlurContentControl.js
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Events/onBlurContentControl.js
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -117,5 +156,39 @@
|
||||
* @alias onChangeContentControl
|
||||
* @description The function called to show which content control has been changed.
|
||||
* @param {ContentControl} control - Defines the content control that has been changed.
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Methods/onChangeContentControl.js
|
||||
*/
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Events/onChangeContentControl.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* Event: onHideContentControlTrack
|
||||
* @event Plugin#onHideContentControlTrack
|
||||
* @memberof Plugin
|
||||
* @typeofeditors ["CDE"]
|
||||
* @alias onHideContentControlTrack
|
||||
* @description The function called when the focus of the content control changes.
|
||||
* @param {string[]} ids - array with ids of controls that lost focus
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Events/onHideContentControlTrack.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* Event: onShowContentControlTrack
|
||||
* @event Plugin#onShowContentControlTrack
|
||||
* @memberof Plugin
|
||||
* @typeofeditors ["CDE"]
|
||||
* @alias onShowContentControlTrack
|
||||
* @description The function called when the track of the content control appears.
|
||||
* @param {string[]} ids - array with ids of controls that received focus
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Events/onShowContentControlTrack.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* Event: onInsertOleObjects
|
||||
* @event Plugin#onInsertOleObjects
|
||||
* @memberof Plugin
|
||||
* @typeofeditors ["CDE"]
|
||||
* @alias onInsertOleObjects
|
||||
* @description The function called when the track of the content control hides.
|
||||
* @param {object[]} data - array with data of inserted ole-objects
|
||||
* @see office-js-api/Examples/Plugins/{Editor}/Plugin/Events/onInsertOleObjects.js
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user