extensionContentRuntimeArray object

Content runtime is for 'ContentApp', which can be embedded directly into Excel or PowerPoint documents.

Properties that reference this object type:

Syntax

{
  "requirements": {
    "capabilities": [
      {
        capabilities object
      }
    ],
    "scopes": [
      "mail | workbook | document | presentation"
    ],
    "formFactors": [
      "desktop | mobile"
    ]
  },
  "id": "{string}",
  "code": {
    "page": "{string}",
    "script": "{string}"
  },
  "requestedHeight": {number},
  "requestedWidth": {number},
  "disableSnapshot": {boolean}
}

Properties

requirements

Required

Constraints

Supported values

id

A unique identifier for this runtime within the app. This is developer specified.

Type
string

Required

Constraints
Maximum string length: 64.

Supported values

code

Required

Constraints

Supported values

requestedHeight

The desired height in pixels for the initial content placeholder. This value MUST be between 32 and 1000 pixels. Default value will be determined by host.

Type
number

Required

Constraints
Maximum number value: 1000.

Supported values

requestedWidth

The desired width in pixels for the initial content placeholder. This value MUST be between 32 and 1000 pixels. Default value will be determined by host.

Type
number

Required

Constraints
Maximum number value: 1000.

Supported values

disableSnapshot

Specifies whether a snapshot image of your content add-in is saved with the host document. Default value is false. Set true to disable.

Type
boolean

Required

Constraints

Supported values
Default value: False.

Examples

{
 "extensions": [
    {
      "runtimes": [
        {
          "requirements": {
            "capabilities": [
              {
                "name": "MailBox",
                "minVersion": "1.10"
              }
            ]
          },
          "id": "eventsRuntime",
          "type": "general",
          "code": {
            "page": "https://contoso.com/events.html",
            "script": "https://contoso.com/events.js"
          },
          "lifetime": "short",
          "actions": [
            {
              "id": "onMessageSending",
              "type": "executeFunction"
            },
            {
              "id": "onNewMessageComposeCreated",
              "type": "executeFunction"
            }
          ]
        }
      ]
    }
  ]
}