Get Started
Plugins
Macros
More information

Adding plugins to ONLYOFFICE Cloud

You can add a plugin to the Cloud service as a Chrome extension.

  1. Create a main folder on your computer and put manifest.json and main.js extension files.
  2. Create a subfolder with the plugin files.
  3. In the main.js file, change the directory to the necessary plugin:

    (function(window, undefined){
        if ("frameEditor" == window.name)
        {
            var _url = chrome.extension.getURL("main.js");
            _url = _url.substr(0, _url.lastIndexOf("main.js"));
            var _baseUrl = _url + "helloworld/";
            var _configUrl = _baseUrl + "config.json";
            ...
        }
    })(window, undefined);
    
  4. Change the plugin name and description, the paths to the plugin icons and all the necessary plugin resources in the manifest.json file:

    {
        "name": "Asc.helloworld",
        "description": "Plugin for ONLYOFFICE. helloworld",
        "version": "1.0",
        "manifest_version": 2,
        "background": {
        },
        "browser_action": {
            "default_icon": {
                "19": "/helloworld/resources/img/icon.png",
                "38": "/helloworld/resources/img/icon@2x.png"
            }
        },
        "web_accessible_resources": [
            "/main.js",
            "/helloworld/scripts/helloworld.js",
            "/helloworld/config.json",
            "/helloworld/resources/img/icon.png",
            "/helloworld/resources/img/icon@2x.png",
            "/helloworld/index.html",
            "/helloworld/index_about.html"
        ],
        ...
    }
    
  5. Launch your Chrome browser and go to chrome://extensions/. Turn on the Developer mode, click the Load unpacked button and select the created main extension folder:

    Extension folder

    The new extension is now available in your browser:

    Extension
  6. Launch ONLYOFFICE Cloud and open any document to check if the new plugin is available in the editors:

    Hello world extension

Click the Remove button on the extension tab and in the opened window confirm your action:

Remove extension

The plugin will be removed from ONLYOFFICE Cloud after its start.