Document Info

Description

The document info section allows to change additional parameters for the document (document owner, folder where the document is stored, uploading date, sharing settings).

Parameters

NameDescriptionTypeExample
authorDefines the name of the document author/creator. Deprecated since version 5.4, please use owner instead.string“John Smith”
createdDefines the document creation date. Deprecated since version 5.4, please use uploaded instead.string“2010-07-07 3:46 PM”
favoriteDefines the highlighting state of the Favorite icon. When the user clicks the icon, the onMetaChange event is called. If the parameter is undefined, the Favorite icon is not displayed at the editor window header.booleantrue
Info - 图1
folderDefines the folder where the document is stored (can be empty in case the document is stored in the root folder).string“Example Files”
ownerDefines the name of the document owner/creator.string“John Smith”
sharingSettingsDisplays the information about the settings which allow to share the document with other users:
  • isLink - changes the user icon to the link icon,
    type: boolean,
    example: false;
  • permissions - the access rights for the user with the name above. Can be Full Access, Read Only or Deny Access,
    type: string,
    example: “Full Access”;
  • user - the name of the user the document will be shared with,
    type: string,
    example: “John Smith”.
array of object
Info - 图2
uploadedDefines the document uploading date.string“2010-07-07 3:46 PM”
Info - 图3

Example

  1. var docEditor = new DocsAPI.DocEditor("placeholder", {
  2. "document": {
  3. "info": {
  4. "favorite": true,
  5. "folder": "Example Files",
  6. "owner": "John Smith",
  7. "sharingSettings": [
  8. {
  9. "permissions": "Full Access",
  10. "user": "John Smith"
  11. },
  12. {
  13. "isLink": true,
  14. "permissions": "Read Only",
  15. "user": "External link"
  16. },
  17. ...
  18. ],
  19. "uploaded": "2010-07-07 3:46 PM"
  20. },
  21. ...
  22. },
  23. ...
  24. });