@shakrmedia/editor-sdk ShakrEditorGetMediaEvent

ShakrEditorGetMediaEvent interface#

Event Object for 'get_media' event.

Signature:
export interface ShakrEditorGetMediaEvent

Properties#

PropertyTypeDescription
callback(res: { media_items: ShakrEditorMedia[]; page_total: number; }) => voidCallback function which should be called with searched media results and total page number.
library_idstringShakrEditorMediaLibrary.id property of ShakrEditorMediaLibrary provided to ShakrEditor constructor option ShakrEditorOptions.media_libraries property. This can be used for distinguish which library has requested the media.
pagenumberPage number starts from 1 which is increased by 1 when a user clicks "Load More" button in Shakr Editor media library user interface.
search_termstringSearch text entered in Shakr Editor media library user interface. In initial event which is for full media list view, this property has empty string value.