Skip to content
This plugin is new and currently in beta. For the stable version, please use the previous version of the plugin.

ExternalImageLibraryTab

Version Availability

This class is available starting from v3.2.0

Create custom tab within the external image library interface to organize images from different sources.

typescript
class ExternalImageLibraryTab

Description

The ExternalImageLibraryTab class allows you to add a custom tab to the image library interface.

Import

typescript
import { ExternalImageLibraryTab } from '@stripoinc/ui-editor-extensions';

Methods

getName()

Returns the translated name/label for the tab.

typescript
public getName(): string

Returns

string - The tab label to display in the image library interface


openImageLibraryTab()

Opens the custom tab and provides a container for rendering your image library UI.

typescript
public openImageLibraryTab(
  container: HTMLElement,
  onImageSelectCallback: ExternalGalleryImageSelectCallback
): void

Parameters

NameTypeDescription
containerHTMLElementDOM element where your custom UI should be rendered
onImageSelectCallbackExternalGalleryImageSelectCallbackCallback to invoke when a user selects an image