]> _ Git - fluidbook-elearning.git/commitdiff
wip #6693 @3
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 5 Feb 2024 17:41:10 +0000 (18:41 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 5 Feb 2024 17:41:10 +0000 (18:41 +0100)
app/Models/Page.php
resources/grapes/blocks/test/block.js [new file with mode: 0644]
resources/grapes/blocks/test/test.blade.php [new file with mode: 0644]
resources/grapes/blocks/test/test.css [new file with mode: 0644]
resources/grapes/blocks/test/test.js [new file with mode: 0644]

index 801a36496d36ff0e41efd481c6510a5e850433d5..78f1273d53f03da15371f323d23d23aad22f7b2d 100644 (file)
@@ -10,7 +10,6 @@ class Page extends CMSPage
     public function setFields()
     {
         parent::setFields();
-
         $this->addField('contents', GrapesPageBuilder::class, 'Contents', ['tab' => 'Contenus','']);
     }
 }
diff --git a/resources/grapes/blocks/test/block.js b/resources/grapes/blocks/test/block.js
new file mode 100644 (file)
index 0000000..1699467
--- /dev/null
@@ -0,0 +1,13 @@
+blocks.push({
+    id: 'image',
+    label: 'Image',
+    media: `<svg style="width:24px;height:24px" viewBox="0 0 24 24">
+    <path d="M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z" />
+    </svg>`,
+    // Use `image` component
+    content: { type: 'image' },
+    // The component `image` is activatable (shows the Asset Manager).
+    // We want to activate it once dropped in the canvas.
+    activate: true,
+    // select: true, // Default with `activate: true`
+});
diff --git a/resources/grapes/blocks/test/test.blade.php b/resources/grapes/blocks/test/test.blade.php
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
diff --git a/resources/grapes/blocks/test/test.css b/resources/grapes/blocks/test/test.css
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/resources/grapes/blocks/test/test.js b/resources/grapes/blocks/test/test.js
new file mode 100644 (file)
index 0000000..e69de29