WhatsaApp Editor
Hello, I have created a wa.me link generator in my filament app with a custom page, it works with a selector for the numbers calendar and a text area for the message, I want to be able to put the Whatsapp text styles that are similar to markdown but they are not the same, so I thought to create a WhatsappEditor class that extends from markdown editor but it gives me error, to see if any of you can help me solve it or if you have a long time to vreate that plugin
<?php
namespace App\Filament\Forms\Components;
use Filament\Forms\Components\MarkdownEditor;
class WhatsAppEditor extends MarkdownEditor
{
protected $toolbarButtons = [];
public function construct(string $name = null)
{
parent::construct($name);
$this->toolbarButtons = [
'bold' => ['', 'texto*'], // Negrita específica para WhatsApp
'italic' => ['_', 'texto'], // Cursiva específica para WhatsApp
'strikethrough' => ['~', '~texto~'], // Tachado específico para WhatsApp
'code' => ['
', '
texto``'], // Monoespaciado específico para WhatsApp
];
}
public function toolbarButtons(): array
{
return $this->toolbarButtons;
}
}0 Replies