@maddoger/strapi-plugin-media-gallery-editor
v0.2.1
Published
Provides custom editor for media gallery
Downloads
298
Readme
@maddoger/strapi-plugin-media-gallery-editor
Provides custom editor for media galleries.
Features:
- shows all galleries in a single view;
- supports drag and drop reordering of items;
- each gallery has a button to add existing files from the media library;
- each gallery has a dropzone to upload new items and add them to the gallery automatically;
- support for Grid and List view modes.
In early ALPHA.
Installation
# npm
npm i strapi-plugin-media-gallery-editor
# pnpm
pnpm i strapi-plugin-media-gallery-editorConfiguration
const plugins = {
// ...
'media-gallery-editor': {
enabled: true,
config: {
galleryTypeName: 'content.media-gallery',
},
},
// ...
}galleryTypeName - name of the component type that will be used for to search media galleries.
Right now videoUrl and capture are also required.
Basic component types
MediaGallery:
{
"collectionName": "components_content_media_galleries",
"info": {
"displayName": "MediaGallery",
"icon": "dashboard",
"description": ""
},
"options": {},
"attributes": {
"items": {
"type": "component",
"repeatable": true,
"component": "content.media-item",
"required": true
},
"caption": {
"type": "richtext"
},
"fullVisibility": {
"type": "boolean"
},
"aspect": {
"type": "decimal",
"min": 0.01
}
}
}MediaItem:
{
"collectionName": "components_content_media_items",
"info": {
"displayName": "MediaItem",
"icon": "chartBubble",
"description": ""
},
"options": {},
"attributes": {
"file": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": ["images", "files", "videos"]
},
"caption": {
"type": "richtext"
},
"videoUrl": {
"type": "string"
}
}
}