How to read the DocEditor config from within a plugin?

To embed the DocEdior we need to call the DocEditor like this:

var docEditor = new DocsAPI.DocEditor("editor", config);

Where the config like How do I read the config flags from within a plugin?

I tried setting the var config as a global variable. I also tried to store the config in the sessionStorage. Neither the sessionStorage nor the global variables are available within the plugin as the editor loads in an iframe from a different domain/subdomain.

I saw that the plugin can read the content-controls, which are form fields, but I don’t want he user o fill in those fields. I want to know they were not modified by the user, and that’s why the config is validated via a JWT token.

  1. How can I read an editorConfig flag like
  2. How can I set a flag in the config, like editorConfig.plugins.myPlugin.serialKey, to be read and validate by my plugin?

Hello @str

Unfortunately, you cannot read editorConfig from plugin context since editorConfig is used on step of initialization of editing session and plugins are started inside this session respectively.

Taking in consideration information above, there is no way to send custom fields into the plugin from editorConfig too.