Class

AssetSidebarWidget

AssetSidebarWidget()

Class representing an asset Extension from Contentstack UI.
Constructor

# new AssetSidebarWidget()

View Source AssetSidebarWidget.ts, line 4

Members

Object

# currentAsset

Gets the content type of the current asset.

View Source AssetSidebarWidget.ts, line 17

object

# currentAsset

View Source AssetSidebarWidget.ts, line 127

Methods

# onChange(callback)

The field.onChange() function is called when another extension programmatically changes the data of the current extension field using the field.setData() function. This function is only available for extension fields that support the following data types: text, number, boolean, or date.
Parameters:
Name Type Description
callback function The function to be called when an asset is edited/changed.

View Source AssetSidebarWidget.ts, line 139

# onPublish(callback)

The onPublish() function executes the callback function every time an asset has been published with the respective payload.
Parameters:
Name Type Description
callback function The function to be called when an asset is published.

View Source AssetSidebarWidget.ts, line 145

# onSave(callback)

This function executes the callback function every time an asset is saved.
Parameters:
Name Type Description
callback function The function to be called when an asset is saved.

View Source AssetSidebarWidget.ts, line 133

# onUnPublish(callback)

The onUnPublish() function executes the callback function every time an asset has been unpublished with the respective payload.
Parameters:
Name Type Description
callback function The function to be called when an asset is un published.

View Source AssetSidebarWidget.ts, line 151