Plugins activated on load?

Any issues about docs (uploading, editing and etc.)
Post Reply
smithj
Posts: 3
Joined: Fri Jan 12, 2018 7:50 pm

Plugins activated on load?

Post by smithj » Thu Apr 19, 2018 8:52 pm

Is there a way to make plugins available on document load? I'd like it so that the plugin will be active without going to the menu and enabling them first, I'd like them to just be on and available from the beginning.

Maxim
Posts: 1751
Joined: Tue Oct 11, 2016 2:34 pm

Re: Plugins activated on load?

Post by Maxim » Thu Apr 26, 2018 1:40 pm

Hello smithj!

Adding a plugin to the server editors
There are two ways to add the plugins to ONLYOFFICE Document Server installation:

Put the folder with the plugin code to ONLYOFFICE Document Server folder depending on the operating system:

For Linux - /var/www/onlyoffice/documentserver/sdkjs-plugins/.
For Windows - %ProgramFiles%\ONLYOFFICE\DocumentServer\sdkjs-plugins\.
The plugins will be available to all the users users of ONLYOFFICE Document Server. No service restart is required.

Or edit the Document Server config to add the following lines:

Code: Select all

var docEditor = new DocsAPI.DocEditor("placeholder", {
    "editorConfig": {
        "plugins": {
            "autostart": [
                "asc.{0616AE85-5DBE-4B6B-A0A9-455C4F1503AD}",
                "asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}",
                ...
            ],
            "pluginsData": [
                "https://example.com/plugin1/config.json",
                "https://example.com/plugin2/config.json",
                ...
            ]
        },
        ...
    },
    ...
});
Where the example.com is the name of the 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 Document Server service client-server interactions.

Post Reply