How to use Method: StartAction EndAction of plugins

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

Hi @bab.kwot

Hmm…
Good question.:handshake:
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:

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.