Asc.scope object


The object is used to pass any additional data (objects, parameters, variables, etc.) to the window.Asc.plugin.callCommand method, which is executed in its own isolated context.

The functions cannot be passed to the callCommand method using the Asc.scope object.
(function(window, undefined){
    var scopeText = ["Hello World!", "This is me!", "I'm glad to see you!!!"];
    window.Asc.plugin.init = function() { = scopeText;
        this.callCommand(function() {
            var oDocument = Api.GetDocument();
            var oParagraph = Api.CreateParagraph();
            for (var i = 0; i <; i++)
                oParagraph.AddText([i] + "<br />");
        }, true);
    window.Asc.plugin.button = function(id)
})(window, undefined);