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 |
documentType | Defines the document type to be opened:
| string | “cell” |
text, spreadsheet and presentation values are deprecated since version 6.1. Please use new values instead. | |||
height | Defines the document height (100% by default) in the browser window. | string | “100%” |
token | Defines the encrypted signature added to the Document Server config in the form of a token. | string | “eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.LwimMJA3puF3ioGeS-tfczR3370GXBZMIL-bdpu4hOU” |
type | 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” |
width | Defines the document width (100% by default) in the browser window. | string | “100%” |
Example
var docEditor = new DocsAPI.DocEditor("placeholder", {
"documentType": "word",
"height": "100%",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.LwimMJA3puF3ioGeS-tfczR3370GXBZMIL-bdpu4hOU",
"type": "desktop",
"width": "100%",
...
});
当前内容版权归 Onlyoffice 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 Onlyoffice .