Initial commit
This commit is contained in:
35
app/View/Components/MarkdownTextarea.php
Normal file
35
app/View/Components/MarkdownTextarea.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user