Config

Description

The config base section allows to change the platform type used, document display size (width and height) and type of the document opened.

Parameters
Name Description Type Example
Defines the document type to be opened: open a text document (.docx, .doc, .odt, .txt, .rtf, .html, .htm, .mht, .epub, .pdf, .djvu, .xps) for viewing or editing - text, open a spreadsheet (.xlsx, .xls, .ods, .csv) for viewing or editing - spreadsheet, open a presentation (.pptx, .ppt, .odp, .ppsx, .pps) for viewing or editing - presentation. string "spreadsheet"
Defines the document height (100% by default) in the browser window. string "100%"
Defines the encrypted signature added to the Document Server config in the form of a token. string "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.t-IDcSemACt8x4iTMCda8Yhe3iZaWbvV5XKSTbuAn0M"
Defines the platform type used to access the document. Can be: optimized to access the document from a desktop or laptop computer - desktop, optimized to access the document from a tablet or a smartphone - mobile, specifically formed to be easily embedded into a web page - embedded. The default value is "desktop". string "desktop"
Defines the document width (100% by default) in the browser window. string "100%"
Example
var docEditor = new DocsAPI.DocEditor("placeholder", {
    "documentType": "text",
    "height": "100%",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.t-IDcSemACt8x4iTMCda8Yhe3iZaWbvV5XKSTbuAn0M",
    "type": "desktop",
    "width": "100%",
    ...
});