Yassine Doghri 9da1d0a1b6 feat(plugins): add aside with plugin metadata next to plugin's readme
- enhance plugin card ui
- refactor components to be more consistent
- invert toggler label for better UX
- edit view components regex
2024-05-28 10:14:10 +00:00

36 lines
718 B
PHP

<?php
declare(strict_types=1);
namespace App\Views\Components\Forms;
class XMLEditor extends FormComponent
{
protected array $props = ['content'];
/**
* @var array<string, string>
*/
protected array $attributes = [
'rows' => '5',
'class' => 'textarea',
];
protected string $content = '';
public function setContent(string $value): void
{
$this->content = htmlspecialchars_decode($value);
}
public function render(): string
{
$this->attributes['slot'] = 'textarea';
$textarea = form_textarea($this->attributes, $this->content);
return <<<HTML
<xml-editor>{$textarea}</time-ago>
HTML;
}
}