init
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.
Parameters:
Name |
Type |
Description |
text |
string
|
Defines the data parameter that depends on the initDataType setting specified in the config.json file. |
Example
Copy code
window.Asc.plugin.init = function () {
this.callCommand(function() {
var oDocument = Api.GetDocument();
var oParagraph = Api.CreateParagraph();
oParagraph.AddText("Hello world!");
oDocument.InsertContent([oParagraph]);
}, true);
};