36 lines
842 B
PHP
36 lines
842 B
PHP
|
|
<?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');
|
||
|
|
}
|
||
|
|
}
|