Customization
Description
The customization section allows to customize the editor interface so that it looked like your other products (if there are any) and change the presence or absence of the additional buttons, links, change logos and editor owner details.
- anonymous
- autosave
- chat
- commentAuthorOnly
- comments
- compactHeader
- compactToolbar
- compatibleFeatures
- customer
- features
- feedback
- forcesave
- goback
- help
- hideNotes
- hideRightMenu
- hideRulers
- integrationMode
- logo
- macros
- macrosMode
- mentionShare
- plugins
- review
- reviewDisplay
- showReviewChanges
- spellcheck
- toolbarHideFileName
- toolbarNoTabs
- trackChanges
- uiTheme
- unit
- zoom
Parameters
Name | Description | Type | Example |
anonymous | Adds a request for the anonymous name:
| object | |
autosave | Defines if the Autosave menu option is enabled or disabled. If set to false, only Strict co-editing mode can be selected, as Fast does not work without autosave. The default value is true. | boolean | true |
Please note that in case this setting is changed in the editor interface, it will be stored in the browser local storage and will overwrite any values sent as the editorConfig.customization.autosave parameter. | |||
chat | Defines if the Chat menu button is displayed or hidden. Please note that in case you hide the Chat button, the corresponding chat functionality will also be disabled. The default value is true. Deprecated since version 7.1, please use the document.permissions.chat parameter instead. | boolean | true |
commentAuthorOnly | Defines if the user can edit and delete only his comments. The default value is false. Deprecated since version 6.3, please use the document.permissions.editCommentAuthorOnly and document.permissions.deleteCommentAuthorOnly fields instead. | boolean | true |
comments | Defines if the Comments menu button is displayed or hidden. Please note that in case you hide the Comments button, the corresponding commenting functionality will be available for viewing only, adding and editing comments will be unavailable. The default value is true. | boolean | true |
compactHeader | Defines if the additional action buttons are displayed in the upper part of the editor window header next to the logo (false) or in the toolbar (true) making the header more compact. The default value is false. | boolean | false |
compactToolbar | Defines if the top toolbar type displayed is full (false) or compact (true). The default value is false. | boolean | false |
Please note that in case this setting is changed in the editor interface, it will be stored in the browser local storage and will overwrite any values sent as the editorConfig.customization.compactToolbar parameter. | |||
compatibleFeatures | Defines the use of functionality only compatible with the OOXML format. For example, do not use comments on the entire document. The default value is false. | boolean | false |
customer | Contains the information which will be displayed in the editor About section and visible to all the editor users. The object has the following parameters:
| object | |
features | Defines the parameters that the user can disable or customize if possible:
| object | |
Please note that in case spellcheck setting is changed in the editor interface, it will be stored in the browser local storage and will overwrite any values sent as the editorConfig.customization.features.spellcheck parameter. | |||
feedback | Defines settings for the Feedback & Support menu button. Can be either boolean (simply displays or hides the Feedback & Support menu button) or object. In case of object type the following parameters are available:
| boolean or object | true |
forcesave | Adds the request for the file force saving to the callback handler when saving the document within the document editing service (e.g. clicking the Save button, etc.). The default value is false. | boolean | false |
Please note that in case this setting is changed in the editor interface, it will be stored in the browser local storage and will overwrite any values sent as the editorConfig.customization.forcesave parameter. | |||
goback | Defines settings for the Open file location menu button and upper right corner button. The object has the following parameters:
| boolean or object | true |
help | Defines if the Help menu button is displayed or hidden. The default value is true. | boolean | true |
hideNotes | Defines if the note panel is displayed or hidden on first loading. The default value is false. This parameter is available for the presentation editor only. | boolean | false |
Please note that in case this setting is changed in the editor interface, it will be stored in the browser local storage and will overwrite any values sent as the editorConfig.customization.hideNotes parameter. | |||
hideRightMenu | Defines if the right menu is displayed or hidden on first loading. The default value is false. | boolean | false |
Please note that in case this setting is changed in the editor interface, it will be stored in the browser local storage and will overwrite any values sent as the editorConfig.customization.hideRightMenu parameter. | |||
hideRulers | Defines if the editor rulers are displayed or hidden. This parameter is available for the document and presentation editors. The default value is false for the document editor and true for presentations. | boolean | false |
integrationMode | Defines the mode of embedding editors into the web page. The embed value disables scrolling to the editor frame when it is loaded as the focus is not captured. | string | embed |
logo | Changes the image file at the top left corner of the editor header. The recommended image height is 20 pixels. The object has the following parameters:
| object | |
macros | Defines if document macros will be automatically run when the editor opens. The default value is true. The false value hides the macros settings from the user. | boolean | true |
macrosMode | Defines the macros run mode when autostart is enabled. Can take the following values:
| string | warn |
Please note that in case this setting is changed in the editor interface, it will be stored in the browser local storage and will overwrite any values sent as the editorConfig.customization.macrosMode parameter. | |||
mentionShare | Defines the hint that describes the event after mentions in a comment. If true, a hint indicates that the user will receive a notification and access to the document. If false, a hint indicates that the user will receive only a notification of the mention. The default value is true. | boolean | true |
Please note that it will only be available for the comments if the onRequestSendNotify event is set. | |||
plugins | Defines if plugins will be launched and available. The default value is true. | boolean | true |
review | Contains the information about the review mode. The object has the following parameters:
| object | |
The showReviewChanges, reviewDisplay, trackChanges parameters are deprecated since version 7.0. Please use the review parameter instead. Please note that in case this setting is changed in the editor interface, it will be stored in the browser local storage and will overwrite any values sent as the editorConfig.customization.review.hoverMode and the editorConfig.customization.review.reviewDisplay parameters. | |||
reviewDisplay | Defines the review editing mode in the document editor. This parameter can take the following values:
| string | original |
Deprecated since version 7.0. Please use the review.reviewDisplay parameter instead. Please note that in case this setting is changed in the editor interface, it will be stored in the browser local storage and will overwrite any values sent as the editorConfig.customization.reviewDisplay parameter. | |||
showReviewChanges | Defines if the review changes panel is automatically displayed or hidden when the editor is loaded. The default value is false. | boolean | false |
Deprecated since version 7.0. Please use the review.showReviewChanges parameter instead. | |||
spellcheck | Defines if the spell checker is automatically switched on or off when the editor is loaded. Spell checker will only be available for the document editor and the presentation editor. The default value is true. | boolean | true |
Deprecated since version 7.1. Please use the features.spellcheck parameter instead. Please note that in case this setting is changed in the editor interface, it will be stored in the browser local storage and will overwrite any values sent as the editorConfig.customization.spellcheck parameter. | |||
toolbarHideFileName | Defines if the document title is visible on the top toolbar (false) or hidden (true). The default value is false. | boolean | false |
Please note that this setting is used when the compactHeader and toolbarNoTabs parameters are set to true. | |||
toolbarNoTabs | Defines if the top toolbar tabs are distinctly displayed (false) or only highlighted to see which one is selected (true). The default value is false. | boolean | false |
trackChanges | Defines if the document is opened in the review editing mode (true) or not (false) regardless of the document.permissions.review parameter (the review mode is changed only for the current user). If the parameter is undefined, the document.permissions.review value is used (for all the document users). | boolean | true |
Deprecated since version 7.0. Please use the review.trackChanges parameter instead. | |||
uiTheme | Defines the editor theme settings. It can be set in two ways:
| string | theme-dark |
Please note that in case this setting is changed in the editor interface, it will be stored in the browser local storage and will overwrite any values sent as the editorConfig.customization.uiTheme parameter. | |||
unit | Defines the measurement units used on the ruler and in dialog boxes. Can take the following values:
| string | cm |
Please note that in case this setting is changed in the editor interface, it will be stored in the browser local storage and will overwrite any values sent as the editorConfig.customization.unit parameter. | |||
zoom | Defines the document display zoom value measured in percent. Can take values larger than 0. For text documents and presentations it is possible to set this parameter to -1 (fitting the document to page option) or to -2 (fitting the document page width to the editor page). The default value is 100. | integer | 100 |
Please note that in case this setting is changed in the editor interface, it will be stored in the browser local storage and will overwrite any values sent as the editorConfig.customization.zoom parameter. | |||
* - available for editing only for ONLYOFFICE Developer Edition
Example
var docEditor = new DocsAPI.DocEditor("placeholder", {
"editorConfig": {
"customization": {
"anonymous": {
"request": true,
"label": "Guest"
},
"comments": true,
"compactHeader": false,
"compactToolbar": false,
"compatibleFeatures": false,
"customer": {
"address": "My City, 123a-45",
"info": "Some additional information",
"logo": "https://example.com/logo-big.png",
"logoDark": "https://example.com/dark-logo-big.png",
"mail": "john@example.com",
"name": "John Smith and Co.",
"phone": "123456789",
"www": "example.com"
},
"features": {
"spellcheck": {
"mode": true,
}
},
"feedback": {
"url": "https://example.com",
"visible": true
},
"forcesave": false,
"goback": {
"blank": true,
"requestClose": false,
"text": "Open file location",
"url": "https://example.com"
},
"help": true,
"hideNotes": false,
"hideRightMenu": false,
"hideRulers": false,
"integrationMode": "embed",
"logo": {
"image": "https://example.com/logo.png",
"imageDark": "https://example.com/dark-logo.png",
"url": "https://www.onlyoffice.com"
},
"macros": true,
"macrosMode": "warn",
"mentionShare": true,
"plugins": true,
"review": {
"hideReviewDisplay": false,
"showReviewChanges": false,
"reviewDisplay": "original",
"trackChanges": true,
"hoverMode": false
},
"toolbarHideFileName": false,
"toolbarNoTabs": false,
"uiTheme": "theme-dark",
"unit": "cm",
"zoom": 100
},
...
},
...
});
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.
If you have any further questions, please contact us at integration@onlyoffice.com.
当前内容版权归 Onlyoffice 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 Onlyoffice .