@shakrmedia/editor-sdk ShakrEditor > on

ShakrEditor.on() method#

get_media event emitted when Shakr Editor loads external media library or try to search in it. This event will be only emitted when ShakrEditorOptions.media_libraries is provided and ShakrEditorMediaLibrary.custom_ui flag is false or not provided.

Signature:
on(type: 'get_media', listener: (data: ShakrEditorGetMediaEvent) => void): this;

Parameters#

ParameterTypeDescription
type'get_media''get_media'
listener(data: ShakrEditorGetMediaEvent) => voidevent listener function
Returns:

this