parent::init();
$this->addField(['name' => 'title',
'label' => 'Titre',
- 'type' => 'Textarea',
+ 'type' => 'Markdown',
'attributes' => [
'rows' => '2', // Sometimes we need to put line breaks in titles, hence the textarea
]]);
<column>
<text-block class="pt-2v" title-class="h1 overlap-left" :title="$title">
- {{-- Todo: make a better function for converting plain text into paragraphs and breaks --}}
- <p>{!! nl2br($page->get("$name.text")) !!}</p>
+ @markdown($page->get("$name.text"))
{{-- Todo: handle button here... $page->get("$name.button") --}}
</text-block>