timo-de-winter/filament-redactor-field 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

timo-de-winter/filament-redactor-field

最新稳定版本:v1.0.9

Composer 安装命令:

composer require timo-de-winter/filament-redactor-field

包简介

A Filament field for the redactor WYSIWYG editor.

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A Filament field for the redactor WYSIWYG editor.

Installation

# Install the package using composer
composer require timo-de-winter/filament-redactor-field

# Publish the assets
php artisan filament:assets

Since Redactor is a paid package it is not shipped with this package. You should include Redactor yourself. This package assumes that window.Redactor is available. All plugins you want to use should be included as well.

You can publish the config file with:

php artisan vendor:publish --tag="filament-redactor-field-config"

This is the contents of the published config file:

return [
    'darkmode_enabled' => true,

    'plugins' => [
        \TimoDeWinter\FilamentRedactorField\Enums\DefaultRedactorPlugin::Alignment,
        \TimoDeWinter\FilamentRedactorField\Enums\DefaultRedactorPlugin::BlockBackground,
        \TimoDeWinter\FilamentRedactorField\Enums\DefaultRedactorPlugin::BlockBorder,
        \TimoDeWinter\FilamentRedactorField\Enums\DefaultRedactorPlugin::BlockColor,
        \TimoDeWinter\FilamentRedactorField\Enums\DefaultRedactorPlugin::BlockFontsize,
        \TimoDeWinter\FilamentRedactorField\Enums\DefaultRedactorPlugin::BlockSpacing,
        \TimoDeWinter\FilamentRedactorField\Enums\DefaultRedactorPlugin::Emoji,
        \TimoDeWinter\FilamentRedactorField\Enums\DefaultRedactorPlugin::FontColor,
        \TimoDeWinter\FilamentRedactorField\Enums\DefaultRedactorPlugin::FontFamily,
        \TimoDeWinter\FilamentRedactorField\Enums\DefaultRedactorPlugin::FontSize,
        \TimoDeWinter\FilamentRedactorField\Enums\DefaultRedactorPlugin::FullScreen,
        \TimoDeWinter\FilamentRedactorField\Enums\DefaultRedactorPlugin::Icons,
        \TimoDeWinter\FilamentRedactorField\Enums\DefaultRedactorPlugin::ImageResize,
        \TimoDeWinter\FilamentRedactorField\Enums\DefaultRedactorPlugin::Limiter,
        \TimoDeWinter\FilamentRedactorField\Enums\DefaultRedactorPlugin::SpecialChars,
        \TimoDeWinter\FilamentRedactorField\Enums\DefaultRedactorPlugin::TextExpander,
        \TimoDeWinter\FilamentRedactorField\Enums\DefaultRedactorPlugin::Variable,
    ],
];

Optionally, you can publish the views using

php artisan vendor:publish --tag="filament-redactor-field-views"

Usage

RedactorEditor::make('content'),

// You can also limit the characters
RedactorEditor::make('content')
    ->maxLength(600),

// You can also directly set the plugins that this specific editor should use (normally it looks at the config)
RedactorEditor::make('content')
    ->plugins(['alignment', 'counter']),
    // OR
   ->plugins(function () {
        return ['counter'];
   })

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 325
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-26