Files
RomhackPlaza/app/View/Components/MarkdownTextarea.php

36 lines
842 B
PHP
Raw Normal View History

2026-05-20 18:25:15 +02:00
<?php
namespace App\View\Components;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
class MarkdownTextarea extends Component
{
public array $toolbar;
/**
* Create a new component instance.
*/
public function __construct(
public string $name,
public string $value = "",
public string $minHeight = "200px",
public bool $required = true
)
{
$this->toolbar = [
'bold', 'italic', 'strikethrough', 'heading', '|', 'quote', 'unordered-list', 'ordered-list', 'check-list', '|', 'link', 'image', '|', 'preview', 'guide'
];
}
/**
* Get the view / contents that represent the component.
*/
public function render(): View|Closure|string
{
return view('components.markdown-textarea');
}
}