Add Content
An Add Content extension lets users add content to Shared Spaces, Collections, and My Files directly from your app.
Declare in Manifest
Add the addContentExtensions property to your manifest.json:
{
"addContentExtensions": [
{
"extensionKey": "my-add-content-extension",
"name": "My Add Content Extension",
"description": "Super description.",
"icon": "my-extension-icon.png",
"supportedContexts": ["sharedspace", "collection", "myfiles"],
"resources": {
"folder": "add-content-extension"
}
}
]
}
| Property | Description |
|---|---|
extensionKey | Unique identifier for the extension. |
name | Descriptive name of the extension. Displayed in the Add button dropdown in each supported context. |
description | Brief overview of the extension's functionality. |
icon | Icon representing the extension. Use a 48x48 pixel image for optimal rendering. |
supportedContexts | The contexts where users can add content: sharedspace, collection, myfiles. |
resources | Location of the resources folder containing your extension's source code. |
Required Files
The source code for your Add Content extension lives in the resources folder you defined in the manifest. The folder contains all of your extension's files (JS, CSS, images, etc.), including one required file:
index.html- The entry point of your Add Content extension.
SDK Functions
Use the following SDK functions to implement this extension:
| Function | Description |
|---|---|
addAssetsToCurrentContext | Adds the selected or generated assets to the current context. Triggers a confirmation modal and returns the slugs of the added assets. |
closeExtension | Closes the extension after assets have been added. If not called, the modal stays open and the user must close it manually. |
Next Steps
- Add Content concept - full reference for the extension type
- Build - write your extension code
Was this page helpful?