Get Started
Plugins
Macros
More information

window.Asc.plugin.executeMethod ("GetVersion", callback)

Description

Defines the method that allows getting the editor version.

Usage

This method should be used in the following way:

window.Asc.plugin.executeMethod ("GetVersion");
Returns

The method returns the editor version in the string format.

Example
window.Asc.plugin.executeMethod ("GetVersion", [], function(version) {
    if (version === undefined) {
        window.Asc.plugin.executeMethod ("PasteText", [ifr.contentDocument.getElementById ("google_translate_element").outerText]);
    }
    else {
        window.Asc.plugin.executeMethod ("GetSelectionType", [], function(sType) {
            switch (sType) {
                case "none":
                case "drawing":
                    window.Asc.plugin.executeMethod("PasteText", [ifr.contentDocument.getElementById("google_translate_element").outerText]);
                    break;
                case "text":
                    window.Asc.plugin.callCommand(function() {
                        Api.ReplaceTextSmart(Asc.scope.arr);
                    });
                    break;
            }
        });
    }
});