Skip to content

Plugins: Autostart

Dmitriy Rotatyy edited this page Oct 23, 2018 · 3 revisions

Autostart plugin

There are several variants how to run a plugin after you open a document.

Using DocumentServer config

If you have only documentserver without test example, you need to change the configuration of documentserver. You can find it in

/etc/onlyoffice/documentserver/default.json for Linux, and

C:\Program Files\ONLYOFFICE\DocumentServer\config\default.json for Windows.

Change the value for the key autostart in plugin. It must contain all GUID of plugins you want to run.

Example:

"plugins":{ "uri":"/sdkjs-plugins", "autostart":[ "asc.{C36DFFB5-08F0-4A68-B829-5FB1F7D49726}" ] }

Using DocumentServer Test Example config

If you have a test example like this, you can change the other configuration file. In our node.js text example it is placed in

/etc/onlyoffice/documentserver-example/default.json for Linux, and

C:\Program Files\ONLYOFFICE\DocumentServer\example\config\default.json for Windows.

Find plugins key, and change autostart and pluginsData sections (you need to add these sections if they were not created).

autostart - is an array of GUIDs for adding plugins you want to run.

pluginsData - is a link to the config file for the plugin. If the plugin has been added before, the config file must contain local link.

Example:

"plugins":{  
   "autostart":[  
      "asc.{F5BACB61-64C5-4711-AC8A-D01EC3B2B6F1}"
   ],
   "pluginsData":[  
      "http://localhost/sdkjs-plugins/clipart/config.json"
   ]
}
Clone this wiki locally