The sample code seems not working:
window.Asc.plugin.executeMethod (“StartAction”, [“Block”, “Save to local storage…”], function () {
console.log (“sha256”, “123456”);
window.Asc.plugin.executeMethod (“EndAction”, [“Block”, “bbbbbbtorage…”]);
});
The page is keeping loading like this on Version7.4.1 community
![image](https://forum.onlyoffice.com/uploads/default/original/2X/6/69c216de954078b5884be6f6ee2b43f78b3eac8f.png)
Hi @bab.kwot
Hmm…
Good question.![:handshake: :handshake:](https://forum.onlyoffice.com/images/emoji/twitter/handshake.png?v=10)
I haven’t looked into that API.
I’ll check with my colleagues to get more information and update this thread when we have something to share. ![:ok_hand: :ok_hand:](https://forum.onlyoffice.com/images/emoji/twitter/ok_hand.png?v=10)
Hi @bab.kwot
I apologize for the delay since my last message.
It seems we have an error in our documentation:
Here is the correct example for the connector:
function startAction() {
function setPasswordByFile(type, value) {
console.log(type, value);
}
// var flag = 'Information'
var flag = 'Block';
connector.executeMethod("StartAction", [`${flag}`, "Message 1"], function() {
setPasswordByFile("sha256", "123456");
setTimeout(function() {
connector.executeMethod("EndAction", [`${flag}`, "Message 1"]);
console.log("End Action");
}, 2000);
});
}
Additionally, I want to note that we found a bug where the action does not complete if the description string in StartAction
and EndAction
are different.