Advanced parameters

The parameters, which can be changed for ONLYOFFICE Document Server, can be subdivided into the following main sections:

config - allows to change the platform type used, document display size (width and height) and type of the document opened;

  • document - contains all the parameters pertaining to the document (title, url, file type, etc.);
    • info - contains additional parameters for the document (document owner, folder where the document is stored, uploading date, sharing settings);
    • permissions - defines whether the document can be edited and downloaded or not;
  • editorConfig - defines parameters pertaining to the editor interface: opening mode (viewer or editor), interface language, additional buttons, etc.);
    • customization - 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;
    • embedded - is used for the embedded document type only and allows to change the behavior of the buttons used to control the embedded mode;
    • plugins - is used to connect the necessary plugins to your Document Server, so that they become visible to all document editor users;
  • events - is the list of special events called when some action is applied to the document (when it is loaded, modified, etc.).

The complete config with all the additional parameters looks the following way:

  1. config = {
  2. "document": {
  3. "fileType": "docx",
  4. "info": {
  5. "favorite": true,
  6. "folder": "Example Files",
  7. "owner": "John Smith",
  8. "sharingSettings": [
  9. {
  10. "permissions": "Full Access",
  11. "user": "John Smith"
  12. },
  13. {
  14. "isLink": true,
  15. "permissions": "Read Only",
  16. "user": "External link"
  17. },
  18. ...
  19. ],
  20. "uploaded": "2010-07-07 3:46 PM"
  21. },
  22. "key": "Khirz6zTPdfd7",
  23. "permissions": {
  24. "chat": true,
  25. "comment": true,
  26. "commentGroups": [
  27. "edit": ["Group2", ""],
  28. "remove": [""],
  29. "view": ""
  30. ],
  31. "copy": true,
  32. "deleteCommentAuthorOnly": false,
  33. "download": true,
  34. "edit": true,
  35. "editCommentAuthorOnly": false,
  36. "fillForms": true,
  37. "modifyContentControl": true,
  38. "modifyFilter": true,
  39. "print": true,
  40. "protect": true,
  41. "review": true,
  42. "reviewGroups": ["Group1", "Group2", ""],
  43. "userInfoGroups": ["Group1", ""]
  44. },
  45. "referenceData": {
  46. "fileKey": "BCFA2CED",
  47. "instanceId": "https://example.com"
  48. },
  49. "title": "Example Document Title.docx",
  50. "url": "https://example.com/url-to-example-document.docx"
  51. },
  52. "documentType": "word",
  53. "editorConfig": {
  54. "actionLink": ACTION_DATA,
  55. "callbackUrl": "https://example.com/url-to-callback.ashx",
  56. "coEditing": {
  57. "mode": "fast",
  58. "change": true
  59. },
  60. "createUrl": "https://example.com/url-to-create-document/",
  61. "customization": {
  62. "anonymous": {
  63. "request": true,
  64. "label": "Guest"
  65. },
  66. "autosave": true,
  67. "comments": true,
  68. "compactHeader": false,
  69. "compactToolbar": false,
  70. "compatibleFeatures": false,
  71. "customer": {
  72. "address": "My City, 123a-45",
  73. "info": "Some additional information",
  74. "logo": "https://example.com/logo-big.png",
  75. "logoDark": "https://example.com/dark-logo-big.png",
  76. "mail": "john@example.com",
  77. "name": "John Smith and Co.",
  78. "phone": "123456789",
  79. "www": "example.com"
  80. },
  81. "features": {
  82. "spellcheck": {
  83. "mode": true,
  84. "change": true
  85. }
  86. },
  87. "feedback": {
  88. "url": "https://example.com",
  89. "visible": true
  90. },
  91. "forcesave": false,
  92. "goback": {
  93. "blank": true,
  94. "requestClose": false,
  95. "text": "Open file location",
  96. "url": "https://example.com"
  97. },
  98. "help": true,
  99. "hideNotes": false,
  100. "hideRightMenu": false,
  101. "hideRulers": false,
  102. "integrationMode": "embed",
  103. "logo": {
  104. "image": "https://example.com/logo.png",
  105. "imageDark": "https://example.com/dark-logo.png",
  106. "url": "https://example.com"
  107. },
  108. "macros": true,
  109. "macrosMode": "warn",
  110. "mentionShare": true,
  111. "plugins": true,
  112. "review": {
  113. "hideReviewDisplay": false,
  114. "showReviewChanges": false,
  115. "reviewDisplay": "original",
  116. "trackChanges": true,
  117. "hoverMode": false
  118. },
  119. "toolbarHideFileName": false,
  120. "toolbarNoTabs": false,
  121. "uiTheme": "theme-dark",
  122. "unit": "cm",
  123. "zoom": 100
  124. },
  125. "embedded": {
  126. "embedUrl": "https://example.com/embedded?doc=exampledocument1.docx",
  127. "fullscreenUrl": "https://example.com/embedded?doc=exampledocument1.docx#fullscreen",
  128. "saveUrl": "https://example.com/download?doc=exampledocument1.docx",
  129. "shareUrl": "https://example.com/view?doc=exampledocument1.docx",
  130. "toolbarDocked": "top"
  131. },
  132. "lang": "en",
  133. "location": "us",
  134. "mode": "edit",
  135. "plugins": {
  136. "autostart": [
  137. "asc.{0616AE85-5DBE-4B6B-A0A9-455C4F1503AD}",
  138. "asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}",
  139. ...
  140. ],
  141. "pluginsData": [
  142. "https://example.com/plugin1/config.json",
  143. "https://example.com/plugin2/config.json",
  144. ...
  145. ]
  146. },
  147. "recent": [
  148. {
  149. "folder": "Example Files",
  150. "title": "exampledocument1.docx",
  151. "url": "https://example.com/exampledocument1.docx"
  152. },
  153. {
  154. "folder": "Example Files",
  155. "title": "exampledocument2.docx",
  156. "url": "https://example.com/exampledocument2.docx"
  157. },
  158. ...
  159. ],
  160. "region": "en-US",
  161. "templates": [
  162. {
  163. "image": "https://example.com/exampletemplate1.png",
  164. "title": "exampletemplate1.docx",
  165. "url": "https://example.com/url-to-create-template1"
  166. },
  167. {
  168. "image": "https://example.com/exampletemplate2.png",
  169. "title": "exampletemplate2.docx",
  170. "url": "https://example.com/url-to-create-template2"
  171. },
  172. ...
  173. ],
  174. "user": {
  175. "group": "Group1",
  176. "id": "78e1e841",
  177. "name": "John Smith"
  178. }
  179. },
  180. "events": {
  181. "onAppReady": onAppReady,
  182. "onCollaborativeChanges": onCollaborativeChanges,
  183. "onDocumentReady": onDocumentReady,
  184. "onDocumentStateChange": onDocumentStateChange,
  185. "onDownloadAs": onDownloadAs,
  186. "onError": onError,
  187. "onInfo": onInfo,
  188. "onMetaChange": onMetaChange,
  189. "onOutdatedVersion": onOutdatedVersion,
  190. "onPluginsReady": onPluginsReady,
  191. "onRequestClose": onRequestClose,
  192. "onRequestCompareFile": onRequestCompareFile,
  193. "onRequestCreateNew": onRequestCreateNew,
  194. "onRequestEditRights": onRequestEditRights,
  195. "onRequestHistory": onRequestHistory,
  196. "onRequestHistoryClose": onRequestHistoryClose,
  197. "onRequestHistoryData": onRequestHistoryData,
  198. "onRequestInsertImage": onRequestInsertImage,
  199. "onRequestMailMergeRecipients": onRequestMailMergeRecipients,
  200. "onRequestReferenceData": onRequestReferenceData,
  201. "onRequestRename": onRequestRename,
  202. "onRequestRestore": onRequestRestore,
  203. "onRequestSaveAs": onRequestSaveAs,
  204. "onRequestSendNotify": onRequestSendNotify,
  205. "onRequestSharingSettings": onRequestSaveAs,
  206. "onRequestUsers": onRequestUsers,
  207. "onWarning": onWarning
  208. },
  209. "height": "100%",
  210. "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.LwimMJA3puF3ioGeS-tfczR3370GXBZMIL-bdpu4hOU",
  211. "type": "desktop",
  212. "width": "100%"
  213. };

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.