Is there any way to send status back to editor from custom plugin?

window.Asc.plugin.init = function () {
  window.Asc.plugin.event_onDocumentContentReady = function () {
    var oProperties = {
      "searchString": "ONLYOFFICE",
      "replaceString": "ONLYOFFICE is cool",
      "matchCase": false
    };

    window.Asc.plugin.executeMethod("SearchAndReplace", [oProperties], function () {
      window.Asc.plugin.executeCommand("close", "");
    });
  };
};

Is there any way to send status back to editor so i can check if “SearchAndReplace” is completed or not??
I want to show custom loader in reactjs until the “SearchAndReplace” is completed in docx.

Hello @anand.mainali,
According to the documentation the SearchAndReplace method returns void
https://api.onlyoffice.com/docs/plugin-and-macros/interacting-with-editors/methods/text-document-api/api/searchandreplace/
so there is no way to signalize that the execution of the method is complete.

@Carl the question is not specific to SearchAndReplace method… i want to return some status code from the plugin to editor however its possible.

I want to show custom loader in reactjs until the plugin execution is completed in docx.

There is no such functionality in the Plugin API I’m afraid.