Installing plugins to document editors

Plugins can be added to any editor versions: server and desktop.

Adding a plugin to the desktop editors

You need to take the plugin folder (it must contain the config.json, index.html and the pluginCode.js files), archive it, change the file extension to .plugin and drag-and-drop this archived file to the desktop editor main page. It will be added immediately to the opened editors and all the editors you will open afterwards.

Adding a plugin to the server editors

There are two ways to add the plugins to ONLYOFFICE Document Server installation:

  1. 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.

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

    var docEditor = new DocsAPI.DocEditor("placeholder", {
      "editorConfig": {
        "plugins": {
          "pluginsData": [
            "http://example.com/plugin1/config.json",
            "http://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.

    If the plugins placed into the folder and the plugins specified in the config coincide, the latter will be used.

    See the Document Server API documentation for more information on where to find the config and what and how can be changed there.

Uninstalling plugins from document editors

To remove the installed plugins the following actions need to be done:

  • For the desktop editors - remove the config.json file from the %USERPROFILE%\AppData\Local\ONLYOFFICE\DesktopEditors\data\ (for Windows) or from $HOME/ONLYOFFICE/DesktopEditors/data/ (for Linux) folder and restart the desktop editor application.
  • For the server version - remove the plugin folder (or folders) or delete lines added to the Document Server configuration file, the plugins will become unavailable for all portal users at the editors next start.