ezar101/easyadmin-trix-extension-bundle 问题修复 & 功能扩展

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

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

ezar101/easyadmin-trix-extension-bundle

最新稳定版本:v1.2.0

Composer 安装命令:

composer require ezar101/easyadmin-trix-extension-bundle

包简介

An extension for EasyAdmin that enriches the TextEditorField (Trix) editor with advanced features: Tables, Colors, H2/H3 headings, Underlining, ...

README 文档

README

Latest Stable Version Total Downloads License CI

This Symfony bundle extends the native capabilities of EasyAdmin's TextEditorField (based on Trix). It offers an enhanced writing experience by adding essential features that are missing by default, all without any complex front-end configuration.

✨ Features

  • Table Management : Complete modal interface for inserting, modifying, adding/deleting rows and columns.
  • Semantic titles : Adding tags <h2> and <h3>.
  • Text formatting : Button to underline the text (<u>).
  • Color palette : Integrated color picker to change text color on the fly.
  • Ready to use : Pre-compiled and automatically injected assets (CSS/JS).

📦 Installation

Use Composer to install the bundle:

composer require ezar101/easyadmin-trix-extension-bundle

Next, install the public assets of the bundle (if Symfony does not do so automatically):

php bin/console assets:install

🚀 Use

In your EasyAdmin CRUD controllers, simply replace the native TextEditorField with the ExtendedTextEditorField provided by this bundle.

<?php

namespace App\Controller\Admin;

use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
use Ezar101\EasyAdminTrixExtensionBundle\Field\ExtendedTextEditorField; // <-- Import of the new field

class PostCrudController extends AbstractCrudController
{
    public static function getEntityFqcn(): string
    {
        return Post::class;
    }

    public function configureFields(string $pageName): iterable
    {
        yield ExtendedTextEditorField::new('content')
            ->setNumOfRows(10)
            ->setColumns(12);
            
        // You can use all the usual TextEditorField methods
    }
}

That's it! The bundle automatically injects the Trix configuration (blockAttributes, textAttributes) as well as the necessary CSS and JS files into the EasyAdmin interface.

🛠 Architecture & Assets

The assets (JavaScript and CSS) required for the operation of the new Trix options (including the complex table manager) are pre-compiled and distributed in the public/ folder of the bundle.

If you are using Webpack Encore, Vite, or Importmap in your main project, you do not need to perform any additional configuration. The ExtendedTextEditorField injects its own dependencies independently via Symfony's asset system.

🤝 Contribution

Pull requests are welcome.

If you wish to modify the JavaScript or CSS source code:

  1. Clone this repository.
  2. Edit the files in the assets/ folder.
  3. Recompile the assets to update the public/ folder.

📄 Licence

This project is licensed under the MIT license.

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 0
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固