murph-core/src/core/BuilderBlock/Block/Editor/TextareaBlock.php
2024-05-13 13:58:07 +02:00

27 lines
845 B
PHP

<?php
namespace App\Core\BuilderBlock\Block\Editor;
use App\Core\BuilderBlock\BuilderBlock;
use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag;
#[AutoconfigureTag('builder_block.widget')]
class TextareaBlock extends EditorBlock
{
public function configure()
{
parent::configure();
$this
->setName('textarea')
->setLabel('Text')
->setIsContainer(false)
->setIcon('<i class="fas fa-pencil-alt"></i>')
->setTemplate('@Core/builder_block/editor/textarea.html.twig')
->addSetting(name: 'nl2br', label: 'Insert line breaks', type: 'checkbox', default: true)
->addSetting(name: 'allowHtml', label: 'Allow HTML', type: 'checkbox', default: false)
->addSetting(name: 'value', type: 'textarea')
;
}
}