Update plugin-media

This commit is contained in:
Rami Bitar
2026-06-05 12:05:39 -04:00
parent 244832db64
commit 555dade01a
12 changed files with 15 additions and 33 deletions

View File

@@ -1,8 +1,6 @@
import { ComponentConfig } from "@reacteditor/core";
import { imageField } from "@reacteditor/plugin-media/field";
import { Images } from "lucide-react";
import { ImageGallery, type ImageGalleryProps } from "@/components/landing/image-gallery";
import { frontendAiMediaAdapter } from "@/services/media-adapter";
const imageGalleryEditor: ComponentConfig<ImageGalleryProps> = {
label: "Image gallery",
@@ -40,7 +38,7 @@ const imageGalleryEditor: ComponentConfig<ImageGalleryProps> = {
defaultItemProps: { src: "", alt: "" },
getItemSummary: (it) => it?.caption || "Image",
arrayFields: {
src: { label: "Image", ...imageField({ adapter: frontendAiMediaAdapter }) },
src: { label: "Image", type: "image" },
alt: { label: "Alt text", type: "text", contentEditable: true },
caption: { label: "Caption", type: "text", contentEditable: true },
},