ONLYOFFICE / sdkjs-plugins

The add-ons for ONLYOFFICE Document Server and ONLYOFFICE Desktop Editors.
https://www.onlyoffice.com
Apache License 2.0
136 stars 134 forks source link

How to interact with my document editor and invoke the editor's global search function. #180

Open THL1234 opened 1 year ago

THL1234 commented 1 year ago

I want to interact with my document editor and invoke the editor's global search function. How can I use the callCommon or executeMethod method to achieve this requirement? the code doesn't work

this.connector.callCommand(function() { var oDocument = Api.GetDocument(); var aSearch = oDocument.Search("xxx"); // xxx is someting to search aSearch[0].SetBold(true); }, function() { console.log("callback command"); });

image