Share via


extensionContentRuntimeArray object

Configures a page of content that is embedded in an Excel or PowerPoint document.

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.

Important

Leaving this property with its default value of false makes an image of the add-in visible for users that open the document in a version of the Office application that doesn't support Office Add-ins, or provides a static image of the add-in if the application can't connect to the server hosting the add-in. However, this also means that potentially sensitive information displayed in the add-in can be accessed directly from the document hosting the add-in.

Type
boolean

Required

Constraints

Supported values
Default value: False.

Examples

{
 "extensions": [
    {
      "contentRuntimes": [
        {
          "id": "ContentRuntime",
          "code": {
            "page": "https://localhost:3000/content.html"
          },
          "requestedWidth": 100,
          "requestedHeight": 100,
          "disableSnapshot": true,
        }
      ]
    }
  ]
}