Skip to main content

Plugins

The plugins section defines the runtime plugin parameters.

autostart

type: string[]

Defines the plugin identifiers from the config.json file that automatically start when the editor opens. The plugins run sequentially in the listed order.

Example: ["asc.{7327FC95-16DA-41D9-9AF2-0E7F449F6800}"]

options

type: object

Defines the external configuration settings for plugins. Settings can target all plugins or a specific plugin — for example, passing an authorization token.

note

You can also use the SetPluginsOptions method of the Automation API to pass this object to the plugin.

Example:

{
"all": {},
"pluginGuid": {}
}

options.all

type: object

Defines the parameters applied to all plugins.

Example:

{
"all": {
"keyAll": "valueAll"
}
}

options.pluginGuid

type: object

Defines the parameters for a specific plugin, identified by its GUID in the asc.{UUID} format.

Example:

{
"asc.{38E022EA-AD92-45FC-B22B-49DF39746DB4}": {
"keyYoutube": "valueYoutube"
}
}

pluginsData

type: string[]

Defines the absolute URLs to the plugin config.json files.

Example: ["https://example.com/plugins/chess-plugin/config.json"]

PluginsPlugins

Example

const config = {
// ...
editorConfig: {
// ...
plugins: {
autostart: [
"asc.{7327FC95-16DA-41D9-9AF2-0E7F449F6800}",
],
options: {
"all": {
keyAll: "valueAll",
},
"asc.{38E022EA-AD92-45FC-B22B-49DF39746DB4}": {
keyYoutube: "valueYoutube",
},
},
pluginsData: [
"https://example.com/plugins/chess-plugin/config.json",
],
},
},
};

const docEditor = new DocsAPI.DocEditor("placeholder", config);

The example.com is the name of the server where document manager and document storage service are installed and the plugins are placed. See the How it works section to find out more on ONLYOFFICE Docs service client-server interactions.