Hello, may I ask if I am in JavaScript. Introduced sdkjs plugins/v1. plugins. js in DocumentServer and attempted to write strings into the editor using the “window. Asc. plugin. executeMethod” (“InputText”, [“ONLYOFFICE Plugins”, “ONLYOFFICE for developers”]; "method mentioned in the plugin documentation. But when I was executing the method, I reported an error: window.Asc.plugin. executeMethod is not a function. Then I printed out the window. Asc. plugin object without seeing the executeMethod method. May I ask which step I made an error in.
Hello @isfifia
Possibly the issue is that the structure of the plugin is incorrect. Please take a look at it here:
https://api.onlyoffice.com/plugin/structure
As a reference, you can check out sample plugin Search and Replace in which also executeMethod
is used:
https://api.onlyoffice.com/plugin/example/searchandreplace
On the example page you can find a link to GitHub where all plugin code can be found.
Okay, thank you for your answer。
I checked sdkjs-plugins/helloworld at master · ONLYOFFICE/sdkjs-plugins · GitHub This example.
I want a similar feature, but the inserted text should come from external sources. What should I do.
Hello @isfifia
Document Server is capable of listening for the data from external sources only with Developer Edition license, for such cases the connector class of Automation API must be used:
https://api.onlyoffice.com/editors/connector
If you are interested in obtaining Developer Edition license of Document Server, please contact our Sales Department via sales@onlyoffice.com to get more information.
Hello, I have downloaded the developer version trial version. I need to complete the functions first before reporting to my superiors for purchase。
I created a connector object using var connector=docEditor. createConnector(), but the resulting object seems to be different from the one on the document。
Hello @isfifia
Sorry for the late reply.
In the documentation all methods are listed. In the console you can find these methods by enlisting [[Prototype]]
array of the connector
object:
Since you have Developer Edition trial license now, you can also contact us via onlyofficesupport.zendesk.com to get prompter replies.