@shakrmedia/editor-sdk ShakrEditor > on

ShakrEditor.on() method#

open_media_library event emitted when Shakr Editor opens external media library. This event will be only emitted when ShakrEditorOptions.media_libraries is provided and ShakrEditorMediaLibrary.custom_ui flag is true.

Signature:
on(type: 'open_media_library', listener: (data: ShakrEditorOpenMediaLibraryEvent) => void): this;

Parameters#

ParameterTypeDescription
type'open_media_library''open_media_library'
listener(data: ShakrEditorOpenMediaLibraryEvent) => voidevent listener function
Returns:

this