Mashroom Content Media Library App
Plugin for Mashroom Server, a Microfrontend Integration Platform.
Part of the Mashroom Content extension.
This Portal App allows it to manage a Media Library (Images, Videos).
Usage
If node_modules/@mashroom is configured as plugin path just add @mashroom-content/mashroom-content-media-library-app as dependency.
After that you can Drag the App Mashroom Content Media Library App onto any page via Admin Toolbar.
And you can also use it in your custom Portal Apps to lookup assets like this:
const responseChannelTopic = `__selected_video_${randomId()}__`;
const mediaLibraryAppConfig = {
modalMode: true,
typeFilter: 'image',
responseChannelTopic,
};
portalAppService.loadAppModal('Mashroom Content Media Library App', 'Select Image', mediaLibraryAppConfig).then((portalApp) => {
messageBus.subscribeOnce(responseChannelTopic, (asset: MashroomContentAsset) => {
console.debug('Received asset:', asset);
portalAppService.unloadApp(portalApp.id);
});
});