window.Asc.plugin.executeMethod («GetVersion», callback)
Описание
Определяет метод, позволяющий получить версию редактора.
Применение
Этот метод следует использовать следующим образом:
window.Asc.plugin.executeMethod ("GetVersion");
Возвращает
Метод возвращает версию редактора в строковом формате.
Пример
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; } }); } });
Была ли полезна статья?