Skip to main content

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"
}
}
]
}
PropertyDescription
extensionKeyUnique identifier for the extension.
nameDescriptive name of the extension. Displayed in the Add button dropdown in each supported context.
descriptionBrief overview of the extension's functionality.
iconIcon representing the extension. Use a 48x48 pixel image for optimal rendering.
supportedContextsThe contexts where users can add content: sharedspace, collection, myfiles.
resourcesLocation 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:

FunctionDescription
addAssetsToCurrentContextAdds the selected or generated assets to the current context. Triggers a confirmation modal and returns the slugs of the added assets.
closeExtensionCloses the extension after assets have been added. If not called, the modal stays open and the user must close it manually.

Next Steps

Was this page helpful?