Sending notifications

The desktop app can send text messages to be displayed to the user. To do so, declare the function:

window.onSystemMessage = function onSystemMessage(e) {}

e

Defines the message parameters.

Type: object

Example:

{
  "type": "operation",
  "opMessage": "Loading...",
  "opType": 1
}

e.type

Checks if the message type is operation. If not, then no messages are displayed to the user.

Type: string

Example: "operation"

e.opMessage

Defines the message that will be displayed to the user.

Type: string

Example: "Loading..."

e.opType

Defines the message by the operation type if the opMessage parameter is undefined. Set it to 0 to inform the user about file upload, or to 1 to inform about file encryption.

Type: integer

Example: 1

Example

window.onSystemMessage({type: "operation", opType: 1})

Updating file status

The desktop app can send notifications about file editing completion.

Declare the following global function:

window.DesktopUpdateFile = function DesktopUpdateFile() {}

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).