Extension name
Optional
parameters?: { Parameter definitions
Optional
installation?: ParameterDefinition<InstallationParameterType>[]Optional
instance?: ParameterDefinition<ParameterType>[]Optional
sidebar?: booleanControls the location of the extension. If true it will be rendered on the sidebar instead of replacing the field's editing control
Optional
src?: stringURL where the root HTML document of the extension can be found
Optional
srcdoc?: stringString representation of the extension (e.g. inline HTML code)
Optional
parametersValues for installation parameters
Deletes this object on the server.
Promise for the deletion. It contains no data, but the Promise error case should be handled.
const contentful = require('contentful-management')
const client = contentful.createClient({
accessToken: '<content_management_api_key>'
})
client.getSpace('<space_id>')
.then((space) => space.getEnvironment('<environment_id>'))
.then((environment) => environment.getUiExtension('<ui_extension_id>'))
.then((extension) => extension.delete())
.then(() => console.log(`UI Extension deleted.`))
.catch(console.error)
Sends an update to the server with any changes made to the object's properties
Object returned from the server with updated changes.
const contentful = require('contentful-management')
const client = contentful.createClient({
accessToken: '<content_management_api_key>'
})
client.getSpace('<space_id>')
.then((space) => space.getEnvironment('<environment_id>'))
.then((environment) => environment.getUiExtension('<ui_extension_id>'))
.then((extension) => {
extension.extension.name = 'New UI Extension name'
return extension.update()
})
.then((extension) => console.log(`UI Extension ${extension.sys.id} updated.`))
.catch(console.error)
Field types where an extension can be used