window.Asc.plugin.executeMethod ("GetSelectionType", callback)
Defines the method that allows getting the type of the current selection.
This method should be used in the following way:
window.Asc.plugin.executeMethod ("GetSelectionType");
The method returns the selection type in the string format: "none", "text", "drawing" or "slide".
window.Asc.plugin.executeMethod ("GetSelectionType", [], function(sType) {
switch (sType) {
case "none":
case "drawing":
window.Asc.plugin.executeMethod ("PasteText", [$("#txt_shower")[0].innerText]);
break;
case "text":
window.Asc.plugin.callCommand (function() {
Api.ReplaceTextSmart (Asc.scope.arr);
});
break;
}
});