]> _ Git - fluidbook-toolbox.git/commitdiff
wip #7526 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 13 May 2025 13:36:54 +0000 (15:36 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 13 May 2025 13:36:54 +0000 (15:36 +0200)
app/Fields/MarkdownBoldItalic.php [new file with mode: 0644]
app/SubForms/Quiz/Question.php

diff --git a/app/Fields/MarkdownBoldItalic.php b/app/Fields/MarkdownBoldItalic.php
new file mode 100644 (file)
index 0000000..0c487ef
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+
+namespace App\Fields;
+
+use Cubist\Backpack\Magic\Fields\Markdown;
+
+class MarkdownBoldItalic extends Markdown
+{
+    protected $_simplemdeAttributes = [
+        'spellChecker' => false,
+        'toolbar' => ['bold', 'italic', '|', 'preview', 'side-by-side', 'fullscreen', '|', 'guide'],
+    ];
+}
index 5de4c379c375c8afc46d39516a2956926f99a414..1ea5c84a46c4428bce2949d8b1a3759a2b65beca 100644 (file)
@@ -3,6 +3,7 @@
 
 namespace App\SubForms\Quiz;
 
+use App\Fields\MarkdownBoldItalic;
 use App\SubForms\TitleAndText;
 use Cubist\Backpack\Magic\Fields\BunchOfFields;
 use Cubist\Backpack\Magic\Fields\BunchOfFieldsMultiple;
@@ -19,7 +20,7 @@ class Question extends SubForm
         parent::init();
 
         $this->addField(['name' => 'question',
-            'type' => 'Text',
+            'type' => MarkdownBoldItalic::class,
             'label' => __('Intitulé de la question'),
         ]);