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

plugin code only works in the edit mode #131

Open capricornstone opened 4 years ago

capricornstone commented 4 years ago

Hello, I wrote a plugin which can find text in the document editor, code like this: ... Asc.scope.text="sometext"; window.Asc.plugin.callCommand(function() { Api.asc_findText(Asc.scope.text, true, true); }, true); ... when I open a docx file, it only works in the edit mode, does not works in the view mode when I open a pdf file in the document editor, the plugin code does not work in both modes

ShockwaveNN commented 4 years ago

@askonev Please take a look

capricornstone commented 3 years ago

Can Api.asc_findText(sometext, true, true); works in the view mode?or some other findText method can works in the view mode? thanks.

askonev commented 3 years ago

Hello @capricornstone! We apologize for the long wait. Your problem is related to the fact that "view mode" is blocking the method you used.

A task 47709 has been created to discuss the solution to this problem.