+ {imageUrl &&
}
+
+
+ {imageUrl && (
+ <>
+
+ >
+ )}
+
+
+ Si besoin, Utilisez le champ "Légende"de la médiathèque pour afficher un
+ copyright
+
+
+ Si besoin, Utilisez le champ "Description" de la médiathèque pour donner
+ afficher une description de votre image
+
+ {imageUrl && (
+
+
+
+
+
+ )}
+
+ >
+ );
+}
diff --git a/blocks/_components/ImageUtils.jsx b/blocks/_components/ImageUtils.jsx
new file mode 100644
index 0000000..b02fb78
--- /dev/null
+++ b/blocks/_components/ImageUtils.jsx
@@ -0,0 +1,16 @@
+export function setImageAttributes(image) {
+ setAttributes({
+ imageId: image.id,
+ imageAlt: image.alt,
+ imageUrl: image.url,
+ });
+}
+
+export function removeImageAttributes() {
+ console.log("removeImageAttributes");
+ setAttributes({
+ imageId: null,
+ imageAlt: null,
+ imageUrl: null,
+ });
+}
diff --git a/blocks/_components/editor.css b/blocks/_components/editor.css
new file mode 100644
index 0000000..e69de29