| Install | |
|---|---|
composer require androsamp/filament-rich-editor-textcolor |
|
| Latest Version: | v1.3.1 |
| PHP: | ^8.1 |
Plugin for Filament Rich Editor: text color selection (TipTap/ProseMirror).
composer require androsamp/filament-rich-editor-textcolor
->toolbarButtons(['textColorPicker'])
->floatingToolbars([
'paragraph' => [
'textColorPicker'
]
])
Rendering:
use Filament\Forms\Components\RichEditor\RichContentRenderer;
// Fetch the post and its content
$post = Post::first();
// Render the content using Filament's RichContentRenderer
$renderer = RichContentRenderer::make($post->content);
// $renderer now contains the final HTML with text color support
The package includes translations for English and Russian languages. The translations are automatically loaded when the package is installed.
'filament-rich-editor-textcolor::text-color.label' // Button label
'filament-rich-editor-textcolor::text-color.modal_heading' // Modal heading
To customize the translations, you can publish them to your project:
php artisan vendor:publish --tag=filament-rich-editor-textcolor-translations
This will copy the translation files to resources/lang/vendor/filament-rich-editor-textcolor/.
en) - Defaultru)MIT