androsamp/filament-rich-editor-textcolor
Composer 安装命令:
composer require androsamp/filament-rich-editor-textcolor
包简介
Filament Rich Editor text color plugin (TipTap) for FilamentPHP.
README 文档
README
Plugin for Filament Rich Editor: text color selection (TipTap/ProseMirror).
Installation
composer require androsamp/filament-rich-editor-textcolor
Usage
->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
Localization
The package includes translations for English and Russian languages. The translations are automatically loaded when the package is installed.
Available Translation Keys
'filament-rich-editor-textcolor::text-color.label' // Button label 'filament-rich-editor-textcolor::text-color.modal_heading' // Modal heading
Publishing Translations
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/.
Supported Languages
- English (
en) - Default - Russian (
ru)
License
MIT
统计信息
- 总下载量: 1.11k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-30