Editor config


The editorConfig section allows to change the parameters pertaining to the editor interface: opening mode (viewer or editor), interface language, additional buttons, etc.).

Name Description Type Example
Specifies the data received from the document editing service using the onMakeActionLink event or the onRequestSendNotify event in data.actionLink parameter, which contains the information about the action in the document that will be scrolled to. object
Specifies absolute URL to the document storage service (which must be implemented by the software integrators who use ONLYOFFICE Document Server on their own server). string "https://example.com/url-to-callback.ashx"
Defines the absolute URL of the document where it will be created and available after creation. If not specified, there will be no creation button. string "https://example.com/url-to-create-document/"
Defines the editor interface language (if some other languages other than English are present). Is set using the two letter (de, ru, it, etc.) language codes. The default value is "en". string "en"
Defines the editor opening mode. Can be either view to open the document for viewing, or edit to open the document in the editing mode allowing to apply changes to the document data. The default value is "edit". string "edit"
Defines the presence or absence of the documents in the Open Recent... menu option where the following document parameters can be set:
  • folder - the folder where the document is stored (can be empty in case the document is stored in the root folder),
    type: string,
    example: "Example Files";
  • title - the document title that will be displayed in the Open Recent... menu option,
    type: string,
    example: "exampledocument1.docx";
  • url - the absolute URL to the document where it is stored,
    type: string,
    example: "https://example.com/exampledocument1.docx".
array of object
Defines the default display format for currency and date and time (in the Spreadsheet Editor only). Is set using the four letter (en-US, fr-FR, etc.) language codes. For the default value the lang parameter is taken, or, if no regional setting corresponding to the lang value is available, en-US is used. string "en-US"
Defines the user currently viewing or editing the document:
  • firstname - the first name of the user. Deprecated since version 4.2, please use name instead,
    type: string,
    example: "John";
  • id - the identification of the user,
    type: string,
    example: "78e1e841";
  • lastname - the last name of the user. Deprecated since version 4.2, please use name instead,
    type: string,
    example: "Smith";
  • name - the full name of the user. Used since version 4.2,
    type: string,
    example: "John Smith".
* - required field
var docEditor = new DocsAPI.DocEditor("placeholder", {
    "editorConfig": {
        "actionLink": ACTION_DATA,
        "callbackUrl": "https://example.com/url-to-callback.ashx",
        "createUrl": "https://example.com/url-to-create-document/",
        "lang": "en",
        "mode": "edit",
        "recent": [
                "folder": "Example Files",
                "title": "exampledocument1.docx",
                "url": "https://example.com/exampledocument1.docx"
                "folder": "Example Files",
                "title": "exampledocument2.docx",
                "url": "https://example.com/exampledocument2.docx"
        "region": "en-US",
        "user": {
            "id": "78e1e841",
            "name": "John Smith"

Where the example.com is the name of the server where document manager and document storage service are installed. See the How it works section to find out more on Document Server service client-server interactions.