Get Started
Plugins
Macros
More information

config.json

Description

The config.json file is plugin configuration file containing the information about the main plugin data needed to register the plugin in the editors.

Parameters
Name Description Type Example
Path to the plugin. All the other paths are calculated relative to this path. In case the plugin is installed on the server, an additional parameter (path to the plugins) is added there. If baseUrl == "" the path to all plugins will be used. string ""
Plugin identifier. It must be of the asc.{UUID} type. string "asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}"
The minimum supported editors version. string "6.3.0"
Path to the plugin description page. If the parameter is specified, the help button is displayed in the plugin window. When the user clicks the button, he follows the link to the plugin description page. string ""
Plugin name which will be visible at the plugin toolbar. string "plugin name"
Translations for the name field. The object keys are the two letter language codes (ru, de, it, etc.) and the values are the plugin name translation for each language. object
Plugin variations, or subplugins, that are created inside the origin plugin. More information you can find here. array of object
The list of skinnable plugin buttons used in the plugin interface (used for visual plugins with their own window only, i.e. isVisual == true && isInsideMode == false). The button object can have the folowing parameters:
  • text - the label which is displayed on the button,
    type: string,
    example: "Cancel";
  • primary - defines if the button is primary or not. The primary flag affects the button skin only,
    type: boolean,
    example: true;
  • isViewer - defines if the button is shown in the viewer mode only or not,
    type: boolean,
    example: false;
  • textLocale - translations for the text field. The object keys are the two letter language codes (ru, de, it, etc.) and the values are the button label translation for each language,
    type: object
array of object
The description, i.e. what describes your plugin the best way. string "plugin description"
Translations for the description field. The object keys are the two letter language codes (ru, de, it, etc.) and the values are the plugin description translation for each language. object
The editors which the plugin is available for (word - text document editor, cell - spreadsheet editor, slide - presentation editor). array of string
Plugin icon image files used in the editors. More information you can find here. array of string
Is usually equal to "" - this is the data which is sent from the editor to the plugin at the plugin start (e.g. if initDataType == "text", the plugin will receive the selected text when run). It may also be equal to encryption in the encryption plugins. string ""
The data type selected in the editor and sent to the plugin: text - the text data, html - HTML formatted code, ole - OLE object data, desktop - the desktop editor data, destop-external - the main page data of the desktop app (system messages), none - no data will be send to the plugin from the editor. string "ole"
Specifies if the plugin watches the text selection events in the editor window. boolean true
The encryption plugin ID as there are several encryption plugins. string "1"
Specifies if the plugin will be displayed in the viewer mode as well as in the editor mode (isDisplayedInViewer == true) or in the editor mode only (isDisplayedInViewer == false). boolean true
Specifies if the plugin must be displayed inside the editor panel instead of its own window (used for visual non-modal plugins only). The following rule must be observed at all times: isModal != isInsideMode. boolean true
Specifies if the opened plugin window is modal (used for visual plugins only, and if isInsideMode is not true). boolean true
Specifies if the plugin is not displayed in the editor interface and is started in the background with the server (or desktop editors start) not interfering with the other plugins, so that they can work simultaneously. boolean false
Specifies if an OLE object must be redrawn when resized in the editor using the vector object draw type or not (used for OLE objects only, i.e. initDataType == "ole"). boolean true
Specifies if the plugin is available when the document is opened in the viewer mode only or not. The default value is false. boolean false
Specifies if the plugin is visual (will open a window for some action, or introduce some additions to the editor panel interface) or non-visual (will provide a button (or buttons) which is going to apply some transformations or manipulations to the document). boolean true
Plugin entry point, i.e. an HTML file which connects the plugin.js file (the base file needed for work with plugins) and launches the plugin code. See the index.html section for the detailed information. string "index.html"
Plugin window size. array of integer
Plugin events. array of string
Specifies if the encryption for the ONLYOFFICE clouds is disabled or not. string "true"
Specifies if the encryption for the third-party clouds is disabled or not. string "true"
Specifies if the mode is reset on restart or not. string "true"
Example
{
        "baseUrl": "",
        "guid": "asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}",
        "minVersion": "6.3.0",
        "help": "",
        "name": "plugin name",
        "nameLocale": {
            "fr": "french plugin name",
            "es": "spanish plugin name"
        },
        "variations": [
            {
                "buttons": [
                    { 
                        "text": "Cancel",
                        "primary": false,
                        "isviewer": false,
                        "textLocale": {
                            "fr": "Annuler",
                            "es": "Cancelar"
                        }
                    }
                ],
                "description": "plugin description",
                "descriptionLocale": {
                    "fr": "french plugin description",
                    "es": "spanish plugin description"
                },
                "EditorsSupport": ["word", "cell", "slide"],
                "icons": [
                    {
                        "100%": { "normal": "icon.png" },
                        "150%": { "normal": "icon@1.5x.png" },
                        "200%": { "normal": "icon@2x.png" }
                    },
                    {
                        "style" : "dark"
                    }
                ],
                "initData": "",
                "initDataType": "ole",
                "initOnSelectionChanged": true,
                "cryptoMode": "1",
                "isDisplayedInViewer": true,
                "isInsideMode": false,
                "isModal": true,
                "isSystem": false,
                "isUpdateOleOnResize": true,
                "isViewer": true,
                "isVisual": false,
                "url": "index.html",
                "size": [600, 700],
                "events": ["onClick"],
                "cryptoDisabledForInternalCloud": "true",
                "cryptoDisabledForExternalCloud": "true",
                "cryptoDisabledOnStart": "true"
            }
        ]
    };