Hello, when I render the <DocumentEditor /> component, is there any way to pass in extra data to the editor such that it can read it from the plugin? For example
Do I understand correctly that you are trying to integrate Document Server to your app via custom HTML tag? If that is so then please visit this page to check out which div tag should be used: https://api.onlyoffice.com/editors/basic
I’m using the @onlyoffice/document-editor-react package. I’d like to to pass in extra data from my React app to my Plugin inside the editor. How can I achieve that?
In the plugin itself, I’ve added a simple var just for demonstration that will obtain the array with all data and print it into the console:
var someVar = Asc.plugin.info.options;
console.log(someVar);
When running the plugin, I am receiving the result in the browser console:
As you can see, the data is available inside Asc.plugin.info.options object which is defined as an array. You can define your data in plugins.options parameter and parse it further in the plugin interface according to your custom logic.