The data sent to the plugin and what is to be done with it and how. This method is called when the plugin is started.

Name Description Type
data The data parameter depends on the "initDataType" setting specified in the plugin configuration config.json file. It can be of the following type: "none" - an empty string, "text" - the selected document text, "html" - selected document fragment, "ole" - OLE object data. string
window.Asc.plugin.init = function () {
    var sScript = 'var oDocument = Api.GetDocument();';
    sScript += 'oDocument.CreateNewHistoryPoint();';
    sScript += 'oParagraph = Api.CreateParagraph();';
    sScript += 'oParagraph.AddText(\'Hello word!\');';
    sScript += 'oDocument.InsertContent([oParagraph]);'; = true;
    this.executeCommand("close", sScript);