Skip to content

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,
  selectedNode?: ImmutableHtmlNode
): void

Parameters ​

NameTypeDescription
containerHTMLElementDOM element where your custom UI should be rendered
onImageSelectCallbackExternalGalleryImageSelectCallbackCallback to invoke when a user selects an image
selectedNodeImmutableHtmlNode(Optional) Selected node for which the gallery is being opened. Available from v3.4.0