@shakrmedia/editor-sdk ShakrEditorGetMediaEvent
ShakrEditorGetMediaEvent interface
Event Object for 'get_media' event.
Signature:export interface ShakrEditorGetMediaEvent
Properties
Property | Type | Description |
---|---|---|
callback | (res: { media_items: ShakrEditorMedia[]; page_total: number; }) => void | Callback function that should be called with the media search results and total page number. |
library_id | string | ShakrEditorMediaLibrary.id property of ShakrEditorMediaLibrary provided to ShakrEditor constructor option ShakrEditorOptions.media_libraries property. This can be used to distinguish which library has requested the media. |
page | number | Page number starts from 1 which is increased by 1 when a user clicks "Load More" button in Shakr Editor media library user interface. |
search_term | string | Search text entered in Shakr Editor media library user interface. For the initial event that is for the full media list view, this property has an empty string value. |